Okay, I've made this flash presentation for class, but I need help with one thing.
I can't make it end, it just loops over and over.
How do I make it loop four times and end at the end of the fourth loop?
thanks!
« previous next » |
someone good with flash please help! (need done by wed.) (Read 44311 times)

#2


Posts: 144
Logged
Start the flash file with a blank keyframe and enter the following into the actions box.
Start your animation in frame 2.
Then at the end of your animation add the following code into the actions box.
That should sort you out
The movie will keep looping back to frame 2 (the beginning of your animation) until the variable loops is greater than 4.
Code:
var loops:Number;
loops = 1;
Start your animation in frame 2.
Then at the end of your animation add the following code into the actions box.
Code:
loops = loops+1;
if (loops > 4) {
stop();
}
else {
gotoAndPlay(2);
}
That should sort you out


#4


Posts: 207
Logged
I'm afraid I need more help!
Our group has determined that we need a disclaimer in our first frame, so that it does not start until you hit a start button. That way if they dissagree with our disclaimer, they do not have to watch the movie. How can I accomplish this?
Our group has determined that we need a disclaimer in our first frame, so that it does not start until you hit a start button. That way if they dissagree with our disclaimer, they do not have to watch the movie. How can I accomplish this?
i>never knows best

#5


Posts: 144
Logged
Easily!
Add the disclaimer to the first frame, and in the actions panel for the first frame add the following code:
On your button add the following code:
In frame 2 add the previous code from my last post.
Start the animation in frame 3.
And again add the same code at the end as before, but change the goToAndPlay method at the end to loop back to frame 3.
Add the disclaimer to the first frame, and in the actions panel for the first frame add the following code:
Code:
stop();
On your button add the following code:
Code:
on (release) {
gotoAndPlay(2);
}
In frame 2 add the previous code from my last post.
Code:
var loops:Number;
loops = 1;
Start the animation in frame 3.
And again add the same code at the end as before, but change the goToAndPlay method at the end to loop back to frame 3.

#6


Posts: 207
Logged
thank you.
I must sound like an idiot, but how do I make a button? All I've ever done w/flash was make loops.
I must sound like an idiot, but how do I make a button? All I've ever done w/flash was make loops.
i>never knows best

#7


Posts: 144
Logged
I am sorry master, I have granted your first two wishes...you must now wish me free! 
Alright alright...draw your button as to how you would like it to look. Then select it and go to "create new symbol".
Give it a name, and select "button" from the list below.
Once its a button double click to go inside the symbol. You will see four frames in the timeline. The four states of the button.
1: Initial State
2. Hover State
3. Pressed State
4. Hit
Pretty self explanatory the above things. But yes, you have created your button, so click back onto the main stage and highlight then button. Go to the actions panel and add the code.

Alright alright...draw your button as to how you would like it to look. Then select it and go to "create new symbol".
Give it a name, and select "button" from the list below.
Once its a button double click to go inside the symbol. You will see four frames in the timeline. The four states of the button.
1: Initial State
2. Hover State
3. Pressed State
4. Hit
Pretty self explanatory the above things. But yes, you have created your button, so click back onto the main stage and highlight then button. Go to the actions panel and add the code.