Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
Screenweasel webforumsuser@macromedia.com #1
Actionscript newbie: simple stop issue
Hello everyone.
I'm trying to get a nested movie to stop playing when a 'stop' button is clicked. This movie is nested within two other movies, and I have the current actions assigned to the 'stop' movie clip (as opposed to the frame):
on (release) {
stop();
}
There is likely something embarrassingly obvious I am overlooking. Ideally, I'd like it to just pause and then continue on with a separate 'play' button, but for now I'll settle with just being able to stop the darn thing.
Thanks for any help.
-screen
Screenweasel webforumsuser@macromedia.com Guest
-
Simple issue. Help, please.
All my prints have a strong magenta cast. This appears on the preview as well as the final print, so it's not a printer issue. No doubt I have some... -
actionscript newbie trouble
hi there, i'm trying to trigger a colour change in an movie clip as i drag it over another on, sounds simple but its driving me mad, any help would... -
actionscript newbie
I am trying to create a very simple interface. I have a button and grey square filled with text off the screen. What I want to happen is this:... -
Simple Actionscript Help Needed! GotoandPlay
Hello- I have a scene that stops on frame 20 (actionscript "stop();"). In that scene are 4 movie clips that make up a directional compass. Each... -
Hide button in actionscript. (newbie)
Hi, I have a button in my movie that i'd like to make disappear when a value reaches a certain limit. The script for the button is: on... -
kglad webforumsuser@macromedia.com #2
Re: Actionscript newbie: simple stop issue
you need to reference the path/instance name of your movieclip.
kglad webforumsuser@macromedia.com Guest
-
juankpro webforumsuser@macromedia.com #3
Re: Actionscript newbie: simple stop issue
Every time you use the ActionScript code
on (release) {
stop();
}
in a button by using the stop() alone you are telling the movie that contains the button to stop, but if you have movie clips the won't stop 'cause they animate independently. So to achieve this you have to give the movie clips waht is called an instance name. Here is an example:
If you have a movie clip of a car that moves in the root timeline, and inside this movieclip you have a movie clip of a wheel that rotates then you can use the following technique:
Select the car movieclip and in the property inspector there is a textBox with the words <InstanceName>. Type a name for the car in this textBox, for example "car_mc".
The edit the car movieclip and select the wheel and in the InstanceName textbox type "wheel_mc".
Now the two elements that you need to control have instance names.
Then in the button that must be in the _root timeline write this code:
on (release) {
car_mc.wheel_mc.stop();
}
This means that the wheel_mc movieclip that is inside the car_mc movieclip has to stop.
juankpro webforumsuser@macromedia.com Guest
-
Screenweasel webforumsuser@macromedia.com #4
Re: Actionscript newbie: simple stop issue
Well, I've tried both methods, with absolute and relative pathways, and for some reason it still isn't working. My code looks like this:
on (release) {
mainstage.todaymovie.stop();
}
I've tried this in every timeline: root, mainstage, and todaymovie, and nothing works. Thanks for trying to help, though. Maybe I'll stumble across the solution.
-screen
Screenweasel webforumsuser@macromedia.com Guest
-
Screenweasel webforumsuser@macromedia.com #5
Re: Actionscript newbie: simple stop issue
Got it to work. No idea how. I didn't do anything different I hadn't tried before. Used this:
on (release) {
_parent.stop();
}
in the movie one down from the one I wanted to stop.
Thanks for everyone's help. =-)
-screen
Screenweasel webforumsuser@macromedia.com Guest



Reply With Quote

