Posts Tagged ‘function’

7 Trim() Equivalent Function In Flash Might Help Someone Else

audium-iconIn PHP we have a function called Trim() to remove characters from a string. However there are no the equivalent to PHP’s trim in Flash. But most time we need to trim a string with extra white space, so we can do only write this by ourselves. The following is 7 actionscript function which can do the same. They might help someone else. *If you know more please don’t hesitate to leave a comment.


Beginning ActionScript 3.0 – Calling Functions

2005-toy-driade-256x256 Question piled upon a question. After we know how to define the functions, we need to know how to use it.


Beginning ActionScript 3.0 – Function Expressions

Lenin-256x256 In the previous section, we talk about how to declare a function by using the function statements. Today, I’ll show you another way to declare the functions.


Beginning ActionScript 3.0 – Define Functions

line-chart-256x256 Continue with the previous section. After we know what function is, maybe we need to know another thing when we calling the functions, the program flow.


Beginning ActionScript 3.0 – Function First Sight

randall-256x256 In last section, we use the printScore() stands for a block of code, in order to get rid of the redundancy and make the code more easier to maintain.


Beginning ActionScript 3.0 – Function Introduction

After the discussion about conditionals and looping, let’s turn to the new topic, function. Before our discussion, let’s do some practice first.



10+ Useful JavaScript Regular Expression Functions to improve your web applications efficiency

globe-Vista-256x256In a previous post trim a string from white space by JavaScript function ( or Another JavaScript function for trim a string from white space ) and JavaScript function-Splits the string by given separator and returns an array with trimmed items, Some Regular expressions have been used. Regular expressions are very powerful tools for performing pattern matches.And validating user input is the bane of every software developer existence. But these patterns used in RegExp can be very simple.

6 very basic but very useful JavaScript Number Format Functions for web developers

How number is treated in JavaScript? JavaScript is loosely typed and the plus operator also concatenates, you can easily convert JavaScript Numbers to Strings similar to this: 1 + “”, but as we all know that JavaScript doesn’t have many built-in methods to format numbers. Most of the time we need to write our customized code to do it.The following is 6 very useful JavaScript number format function,why have to re-inventing the wheel? Don’t waste your valuable time to write it by yourself, only copy which you like and use it!

Of course if you had wrote your proudly number format function,don’t only stock in your hard disk( or your head), let’s share!