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