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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Counter after 30 secs Do a gotoFrame

Status
Not open for further replies.

Flashy2

MIS
Dec 4, 2003
3
GB
Hi im currently Trying to put a timer on my game so after 30 seconds it goes to a nother frame.if any one can help please do. thank you.
 
Another frame? You mean? Main timeline is stopped on a frame and after 30 seconds yu want it to move on the next frame?

Regards,

cubalibre2.gif
 
sorry i didnt explain it very well, i want a counter displayed the seconds from 1 second to 30 seconds after the 30 seconds i want it to the next frame.
 
Try this:

Create a three frame movie (or clip). On layer one in frame 1 and 2 place a dynamic text field where var=counter.

Create an Actions layer. In a keyframe on frame 2 place the following action:

//Set Timer
if (startTime==null){
setTimer = getTimer();
i=0;
}

//Check Timer Value and display seconds

if (getTimer()<startTime+26000){
i=i+1;
gotoAndPlay(1);
_root.counter = math.round(i/10);
}else{
gotoAndPlay(3);
}


Then on Frame 3 place a static text box that says &quot;Done&quot; or something like that. Also place a stop(); action in the action layer for frame 3.

The result is a movie that counts to 30 and goes to the next frame.

Hope that helps!

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top