View Full Version : Start / Stop and movie from same button
28dead
03-07-2003, 08:41 PM
How do i start / stop a movie from the same button
Is there a way to have start / stop / then resume from last frame before stop?
ALSO!!
Can I get the button text to stay black from the rollover
Heres my .fla,
Thankyou Lovelys!!!!!
Ricod
03-07-2003, 10:46 PM
[search]
Just recently, I answerd about the same question : http://www.actionscript.org/forums/showthread.php3?s=&threadid=23642&highlight=stop+play
stop() won't send it back to the first frame, gotoAndStop(1) will do that
28dead
03-08-2003, 09:52 PM
Its sooo not explained in a clear manner to total newbies. I think you should walk through step by actual step
Please!!! Could you show me where im going wrong with mine, it could be one simple thing that im missing, come on you remember what it was like???
Thanks
Ben!!
Ricod
03-09-2003, 12:18 AM
I can't look at your file :(, but here's a mini-tutorial ;) :
This is an example situation. mc is short for movieclip.
- You have a mc, situated on the main timeline and labeled "animation_mc".
path to it is thus : _root.animation_mc;
-You have a button with the pause / play action on it.
It's on the main timeline and its invisible because you only have a graphic in the 'hit' frame (I suggest you use the one you also use for your button state, thus becoming equally big).
- You have a mc with the graphics for the pause / play states hovering over the button. This mc is labeled "button_states" and is also on the main timeline. It consists of 2 frames, both with a stop(); action and one labeled "pause_state" and the othe labeled "play_state"; One has a graphic of a pause button and the other of a play button.
Path to it is thus : _root.button_states.
The button actions :
on (release) {
if (_root.button_states._currentframe == "pause_state") {
// if the pause graphic is showing
_root.animation_mc.stop();
//pause the mc "animation_mc"
_root.button_states.gotoAndStop("play_state");
//It's now paused, so the button should now become a play button
}else{
// if not, thus being "play_state"
_root.animation_mc.play();
//this will resume "animation_mc" from the frame its on
_root.button_states.gotoAndStop("pause_state");
//animation_mc is playing, so button should become a pause button
}
28dead
03-09-2003, 12:37 AM
Its not that simple, please take a quick look at it, the movie playing is in a loop untuil you turn it off
Ricod
03-09-2003, 04:00 AM
I can't look at your file because I don't have Flash here. Otherwise I would have looked earlier.
There's no diference in pausing a movieclip thats looping or one that has a stop() in it. adressing it and telling it to stop(); will pause it, unless you set it to play() with something else.
boyzdynasty
03-10-2003, 04:51 PM
Ricod, i guess you have your hands full in this thread :D
Ricod
03-11-2003, 06:22 AM
Not really, every once in a while someone pops by ...
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.