To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-14-2004, 04:00 PM   #1
CaQman!
Junior Member
 
Join Date: May 2003
Location: Oop North
Posts: 4
numbered loops + reset

I have an animation with a menu screen. When you click the 'go to the pub' button, it loops a few frames (of him downing a pint) 3 times, then progresses to the end (him falling off the stool). Then it goes back to the menu.

That all works fine the 1st time, but any times after that the middle just loops endlessly.

This is the code I used for the loop, put into a frame at the end of the section I wanted looping:
Code:
loopNum++;
if (loopNum == 3) {
	nextFrame();
} else {
	gotoAndPlay(276);
}
I need some code to reset the loopNum value to 0. I can't figure it out!

If you need the file to look at, just ask! I t may have to be the .swf though, the .fla file is 8Mb.
CaQman! is offline   Reply With Quote
Old 10-14-2004, 04:02 PM   #2
jbum
Senior Member
 
jbum's Avatar
 
Join Date: Feb 2004
Location: Los Angeles
Posts: 2,920
code:

loopNum++;
if (loopNum == 3) {
loopNum = 0; // reset here...
nextFrame();
} else {
gotoAndPlay(276);
}

__________________
jbum is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:07 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.