Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for a simple Actionscript 2.0 Pause 1

Status
Not open for further replies.

ColonelBlue

Technical User
Jun 24, 2004
110
US
I have used the code below to pause some timelines ( "paragraphs of text to read" advancing every 15 seconds ), however it has wreaked havoc on all my scenes. After a while scenes will play in succession DESPITE a stop(); at each end. I have used clearInterval(interval) at stragetic places hoping to quell the unwanted scene advance, but to no avail.

A simple pause for "x" seconds Actionscript2.0 which I can call a few times on one timeline and that which would not interfere with any other code as aforementioned would be so appreciated. I have been going absolutely nuts over this for over a day now.

Thanks in advance.



Code:
stop();
var interval:Number = setInterval(
  function():Void {
    play();
    clearInterval(interval);
  },
  15000
);
 
I would specify the scope:
Code:
var interval:Number = setInterval(this, "proceed", 15*1000);
function proceed():Void {
	clearInterval(interval);
	play();
}
Since you don't want to repeat the interval, the other option is:
Code:
setTimeout(this,"proceed",15*1000);

Kenneth Kawamoto
 
Thank you Kenneth! Thank you so much!! Happy Holidays!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top