Creating Symbols Within Flash CS3
package {
import flash.display.Sprite;
import flash.utils.Timer;
import flash.events.TimerEvent;
public class Main extends Sprite {
var timer:Timer;
public function Main () {
super();
timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, bark);
timer.start();
}
public function bark(event:TimerEvent = null):void {
trace("Woof!");
}
}
}
Related examples in the same category