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

Second setInterval not working

Status
Not open for further replies.

NIA2

Technical User
Aug 30, 2006
137
AU
Hi All,

I have a movie clip containing two setIntervals on its timeline, but the second setInterval won't work. I've uploaded the .fla if someone wouldn't mind taking a look?

The movie clip is on the layer called text5.

Would really appreciate any advice.

Thanks
 
Had a quick look. You misspelled all of your interval IDs. Also the interval in question is actually working - you can verify by putting a trace() call. You think it's not working because you don't see it, but that's because the way you structured your movie, which is a different matter...!

Kenneth Kawamoto
 
Thanks for that - just fixed the spelling errors and all is okay. Can you comment further on what's wrong with the structure of the movie - it'd be good to know for future.

Also, I'm not sure how I get this movie to loop back to the beginning. I tried putting the following text on the last frame of the movie clip that sits on the last frame of the main timeline but no luck?? I guess I'm telling the playhead to go back to frame 1 which is labelled "text1" and therefore to play that movie clip again but no luck.

_root.gotoAndStop("text1")
stop();
 
Good practice is to avoid putting code in nested MovieClips - in fact I actually avoid nesting MovieClips all together if possible.

As for your looping, the playhead is going back to frame 1 but again you are not seeing it - frame 1 contains the MovieClip which has reached the end so nothing happens.

Kenneth Kawamoto
 
Sorry to be so vague but I'm not understanding. If the playhead is going back to frame 1 and the movie clip on this frame has ended, how do I get it all to play again. I mean I need it to loop somehow - is it possible?
 
I'm so sorry to have to ask again but the code isn't working. I put:

Text1_mc.gotoAndPlay(1);

on the first frame as you suggested but it doesn't loop. Do you know where I might be going wrong?

Really appreciate your continuted help.
 
I've done what you said - placed a new instance of the clip onto the stage and then renamed it Text1_mc. There's Text1_mc.gotoAndPlay(1); on frame 1 also. I can't figure it out - it's still not working!

I uploaded the revised .fla file to the address mentioned above. Would you mind taking just one last look - you'll be able to see exactly what I've done that way.
 
Just worked out what it was - I had some frames continuing after the movieclips on each layer. I think that was causing some conflict.

Thanks for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top