Flash CS, reference root from external class
- by Lotus
Hi, I made this class and I put it in the same package of Timeline.as (the Document Class):
package {
import flash.utils.Timer;
import flash.events.TimerEvent;
public class Counter2 extends Timer {
public function Counter2(delay:Number, repeatCount:int=0) {
super(delay, repeatCount);
super.addEventListener(TimerEvent.TIMER, timerHandler);
}
public override function start():void {
super.start();
}
public override function stop():void {
super.stop();
}
public function timerHandler(evt:TimerEvent) {
trace(evt.target.currentCount);
}
}
}
This class is instanciated in Timeline.as constructor.
Is there any way to reference Timeline(root) from this class? And, if so, how?
Thanks!