Thanks for the explantion - glad it worked out. Paul ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <flexcoders@yahoogroups.com> Sent: Tuesday, October 30, 2007 2:04 AM Subject: Re: [flexcoders] How do I pause
> More accurately, I want to display some results when the button is hit > and then I want to pause, and then I want to change states. Like this > movie here: > > http://food.aol.com/food-trivia-quizzes/hersheys-kiss > > If you look at this movie, when you choose a question, the right answer > is highlighted in green and the wrong answers are hilighted in red. > this lasts for about 2 seconds, and then the wrong answers disappear. > I'm trying to create something like the 2 second pause. > > This is what I ended up doing and it is simple and works fine for this > purpose. I'm so glad I didn't have to make a custom trigger for a pause > effect. . > > Thanks, again for the help. > > private function nextForm( ):void { > // check answers, show correct answers > getForm(); > //pause > // creates a new five-second Timer > var minuteTimer:Timer = new Timer(1000, 5); > minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, > onTimerComplete); > minuteTimer.start(); > > } > > public function onTimerComplete(evt:TimerEvent):void > { > currentState = "form" + ++_stateIndex; > toplabel.text="Question "+_stateIndex+" of "+_stateCount; > } > > Paul Andrews wrote: >> >> ----- Original Message ----- >> From: <[EMAIL PROTECTED] <mailto:info1%40reenie.org>> >> To: <flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>> >> Sent: Monday, October 29, 2007 7:22 AM >> Subject: [flexcoders] How do I pause >> >> > My movie changes states when the user hits a button, but I want it to >> > pause for 5 seconds. How do I do that ? I see something about pausing a >> > sequence in the documentation. do I have to create a sequence first ? >> >> Can you explain why you need a five second pause after hitting the >> button? >> In normal circumstances this is a very bad idea because then the user >> might >> think that nothing is going to happen - is this the intended effect? >> >> You can get the intended effect by getting the button to set up a timed >> event in five seconds time - check out 'Controlling time intervals' in >> the >> Flex help. >> >> Paul >> >> > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > > > >