Hi Bob, Thanks for the comment, that is the route that started working on after posting the question and the only issue I am having is dispatching the custom event when the timer has been reached, I did a soft search for samples of extending the Timer Class with custom TimerEvents but wasnt able to find any.... would you happen to know where I could find more info?
Thanks!! On 3/12/08, Bob Leisle <[EMAIL PROTECTED]> wrote: > > Hi Helmut, > > One option is extending Timer such that it dispatches your custom > SoundTimerEvent rather than the built in TimerEvent. > Another option, if _sound is a class var, would be to have your > timeEventHandler dispatch the SoundTimerEvent. > > hth, > Bob > > > Helmut Granda wrote: > > I have a custom TimerEvent that I am using to pass > some > > information when the timer is up. My issue is that I dont need to pass > the > > information until the time is up but how can i pass the information to a > > timer that is not available yet? > > > > The basic setup is something like this: > > > > public function myFunc ( varToPass : String, delay : > > Number = 0 ) > > > > { > > > > if ( delay > 0 ) > > > > { > > > > globalTimer = new Timer ( delay, 1) > > globalTimer.start(); > > globalTimer.addEventListener ( > > TimerEvent.Timer, timerEventHandler) > > > > > > } else { > > > > dispatchEvent ( new SoundTimerEvent ( > > SoundTimerEvent.PLAY_VO , _sound ) ) ; > > } > > > > > > } > > > > private function timeEventHandler ( te : TimerEvent > ) > > > > { > > > > // More stuff here > > } > > > > if no delay is added the event gets dispatched > properly > > and everything moves great but how would I add or pass a variable > through > > the globalTimer so that when the timer is up I can catch the _sound > > property? > > > > Any ideas? > > > > TIA > > > _______________________________________________ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > > > > > > > -- > Thanks, > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Bob Leisle > Headsprout Software & Engineering > http://www.headsprout.com > Where kids learn to read! > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- ...helmut _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders