Re: [flexcoders] How do I pause

2007-10-30 Thread Paul Andrews
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



 



[flexcoders] How do I pause

2007-10-29 Thread [EMAIL PROTECTED]
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 ?


RE: [flexcoders] How do I pause

2007-10-29 Thread Alex Harui
Pause effect?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Monday, October 29, 2007 12:23 AM
To: flexcoders@yahoogroups.com
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 ?

 



Re: [flexcoders] How do I pause

2007-10-29 Thread [EMAIL PROTECTED]
There no example of how to make a pause effect in actionscript here
http://livedocs.adobe.com/flex/201/langref/mx/effects/Pause.html
so I am pretty much at a loss on how to proceed.

I guess I have to make a custom effect trigger like this, but I'm having 
a really hard time with it.
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Partsfile=createeffects_154_15.html






Alex Harui wrote:

 Pause effect?

  

 

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] 
 *On Behalf Of [EMAIL PROTECTED]
 *Sent:* Monday, October 29, 2007 12:23 AM
 *To:* flexcoders@yahoogroups.com
 *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 ?

  



RE: [flexcoders] How do I pause

2007-10-29 Thread Alex Harui
If you really want to lock up your app for 5 seconds, do this:

 

Var t:int = getTimer() + 5000;

While (getTimer  t);

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Monday, October 29, 2007 11:48 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How do I pause

 

There no example of how to make a pause effect in actionscript here
http://livedocs.adobe.com/flex/201/langref/mx/effects/Pause.html
http://livedocs.adobe.com/flex/201/langref/mx/effects/Pause.html 
so I am pretty much at a loss on how to proceed.

I guess I have to make a custom effect trigger like this, but I'm having

a really hard time with it.
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhel
p.htm?context=LiveDocs_Book_Partsfile=createeffects_154_15.html
http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhe
lp.htm?context=LiveDocs_Book_Partsfile=createeffects_154_15.html 

Alex Harui wrote:

 Pause effect?

 

 --

 *From:* flexcoders@yahoogroups.com
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] 
 *On Behalf Of [EMAIL PROTECTED] mailto:%2Ainfo1%40reenie.org 
 *Sent:* Monday, October 29, 2007 12:23 AM
 *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com

 *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 ?

 

 



Re: [flexcoders] How do I pause

2007-10-29 Thread Paul Andrews
- Original Message - 
From: [EMAIL PROTECTED]
To: flexcoders@yahoogroups.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 



Re: [flexcoders] How do I pause

2007-10-29 Thread [EMAIL PROTECTED]
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