Thanks Mike that helps...

--- In [email protected], "Mike Britton" <[EMAIL PROTECTED]> wrote:
>
> You could use Timer, but this would also work.  You may want to
switch it to
> use a Singleton.
> 
> Usage:
> 
> var myTraceBack:CommunicationManager = new CommunicationManager();
> myTraceBack.addEventListener(CommunicationManager.ANIMATION_COMPLETE,
> onDoneMove);
> myTraceBack.startCountdown(1000);
> 
> 
> package
> {
>     import flash.display.Sprite;
>     import flash.events.TimerEvent;
>     import flash.utils.Timer;
>     import flash.display.MovieClip;
>     import flash.events.Event;
> 
>     [Event(name="done", type="flash.events.Event")]
> 
>     public class CommunicationManager extends Sprite
>     {
>         public var myOwner:MovieClip;
>         public static var ANIMATION_COMPLETE:String = "done";
> 
>         public function CommunicationManager()
>         {
>             super();
>         }
> 
>         public function startCountdown( duration:Number ):void
>         {
>             var minuteTimer:Timer = new Timer(duration, 1);
> 
>             minuteTimer.addEventListener(TimerEvent.TIMER, onTick);
>             minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE,
> onTimerComplete);
> 
>             minuteTimer.start();
> 
> 
>         }
> 
>         public function onTick(event:TimerEvent):void
>         {
>             trace("onTick");
>         }
> 
>         public function onTimerComplete(event:TimerEvent):void
>         {
>             trace("onTimerComplete!");
>             this.dispatchEvent(new Event("done"));
>         }
> 
>     }
> }
> 
> 
> hth,
> 
> Mike Britton
> 
> On 2/26/07, nextadvantage <[EMAIL PROTECTED]> wrote:
> >
> >   How would I go about changing view states say every 10 secs...
with a 1
> > sec fade?
> >
> >  
> >
> 
> 
> 
> -- 
> Mike
> ----------
> http://www.mikebritton.com
> http://www.mikenkim.com
>


Reply via email to