This content has been marked as final. Show 9 replies
your stop(); is right, is that the only actionscript in the movie? Have you put in the button yet? (I also assume you get no errors when you play it)
--Or actually, are you just watching your current movie by hitting the return key? That will show actions, but ignores AS. Make sure you're using "File - Publish Preview" to test your movie.
That was it. I feel like an idiot...I was previewing it by hitting return...everything worked fine when I tested the movie.
No worries, you're certainly not an idiot. Glad I could help :)
I have a similar problem
I have a tween which has a movie clip inside and a button inside of that.
I want to have the button when clicked to go to another frame and stop the motion guide layer from continuing the movie, as the button when clicked goes to the frame and the motion guide layer keeps going through the movie.
I know I have to use stop(); actionscript somewhere but the motion guide layer goes on playing the rest of the movie regardless.
I have a motion tween for the symbol I was moving around the screen.
However I have published it so I am able to see the changes, and it isn't working the way I want.
Okay, so if I understand what you wrote...
You have a button you'd like to stop a timeline at a certain point. When clicked again you'd like it to keep playing, correct?
You answering mine, Mr Helpy mcHelpson?
I don't want the motion guide layer to carry the movie on. I want the symbol to stop when it is pressed.
Your issue is just a pathing issue. You will need to find the path to the timeline that contains your motion guide. This will be the timeline to execute the "stop();" command. To help determine you path location add the following code to your button:
These will show the associated paths. Once you find the path to the timeline that contains your motion guide then use it to execute the stop(); command. For example, if the "this._parent._parent" was the correct path you would use this code in the button:
My plan was to answer yours, yes, but I was confused, and got pretty busy. Looks like Tim knows more what you're saying than I. :)