topical media & game development
actionscript-example-Star.ax
actionscript-example-Star.ax
(swf
)
[ flash
]
flex
package {
import flash.display.MovieClip;
import flash.utils.Timer;
import flash.events.TimerEvent;
public class actionscript-example-Star extends MovieClip {
private var timer:Timer;
public function actionscript-example-Star () {
timer = new Timer(100, 0);
timer.addEventListener(TimerEvent.TIMER, timerListener);
timer.start();
}
private function timerListener (e:TimerEvent):void {
randomFade();
}
private function randomFade ():void {
alpha = Math.random();
}
public function dispose ():void {
timer.stop();
}
}
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.