Thursday 24 November 2011

Action Script


Where myFunction is the name of the function to be executed and myTimeLapse is the time interval between repetition instance of the code.
For example, we can output the word Hello once every two seconds by creating a function that outputs the word Hello and then pass this function to our setInterval() method.
function helloFun():void {
trace("Hello!");
}
setInterval(helloFun,2000);

No comments:

Post a Comment