[ Login | Register ]

The Shining Source

« previous next »
Pages: [1] Print
someone good with flash please help! (need done by wed.)   (Read 44313 times)
Old Post October 31, 2004, 10:45:53 pm
#1
Shining Light *

Posts: 207

Logged
someone good with flash please help! (need done by wed.)
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!

i>never knows best


Old Post October 31, 2004, 11:48:45 pm
#2
Shining Something *

Posts: 144

Logged
someone good with flash please help! (need done by wed.)
Start the flash file with a blank keyframe and enter the following into the actions box.

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 Smiley The movie will keep looping back to frame 2 (the beginning of your animation) until the variable loops is greater than 4.


Old Post October 31, 2004, 11:50:23 pm
#3
Shining Light *

Posts: 207

Logged


Old Post November 02, 2004, 06:47:43 am
#4
Shining Light *

Posts: 207

Logged
someone good with flash please help! (need done by wed.)
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?

i>never knows best


New Post November 02, 2004, 08:34:59 pm
#5
Shining Something *

Posts: 144

Logged
someone good with flash please help! (need done by wed.)
Easily!

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.


New Post November 03, 2004, 01:10:27 am
#6
Shining Light *

Posts: 207

Logged
someone good with flash please help! (need done by wed.)
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>never knows best


New Post November 03, 2004, 01:17:23 pm
#7
Shining Something *

Posts: 144

Logged
someone good with flash please help! (need done by wed.)
I am sorry master, I have granted your first two wishes...you must now wish me free! Tongue

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.


Pages: [1] Print 
« previous next »
Jump to:  

Powered by SMF 1.1.21 | SMF © 2013, Simple Machines