Flash CS, reference root from external class

Posted by Lotus on Stack Overflow See other posts from Stack Overflow or by Lotus
Published on 2010-12-21T10:11:11Z Indexed on 2010/12/21 13:53 UTC
Read the original article Hit count: 279

Filed under:
|
|

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!

© Stack Overflow or respective owner

Related posts about flash

Related posts about reference