Action Script 3 functions

Out of context: Reply #2

  • Started
  • Last post
  • 13 Responses
  • KarlFreeman0

    It depends if this .as is your base class for the main file or your importing this in to your base class?

    if its your base class then something like this would work?

    package {
    import flash.display.MovieClip;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    public class Counter {
    public function Counter() {
    this.addEventListener(Event.ADDE... stageInit);
    }
    private function stageInit(event:Event) : void {
    //add some sort of user interaction to call CountNow
    }
    private function countNow():void {
    trace("included");
    }
    }
    }

View thread