Thom Phelps
07-24-2006, 11:17 PM
Basic, basic stuff, but having some trouble.
On the main timeline I have one movie clip that has several stops within it. At the beginning of the MC, I stop the main timeline and let the MC play. Each time the MC comes to a stop it prompts the viewer to click the "next" button to continue. When I come to the end of the MC, I stop the MC and play the Main timeline ( _root.play(); ), which in some cases advances the main timeline to the next keyframe where another (different) MC plays and the process starts all over again (main timeline is stopped while the MC plays. Each time the MC stops, it prompts the user to click the "next" button, etc.)
My "next" button is on the main timeline and it tells the MC to play:
on (release) {
MC_instancename.play();
}
Currently, I have a different instance of the "next" buttton for each MC instance, but what I want to do is have one instance of the "next" button and just have it play whichever MC is currently on the timeline.
So I created a variable called currentClipPlaying_mc and at the beginning of the given MC, I set this variable to be the instance name of the movie clip:
_root.currentClipPlaying_mc = this._name;
_root.stop();
It seems simple enough that all I need to do with my "next" button is tell it to play the MC instance name that I've assigned to the variable currentClipPlaying_mc. Which I thought would be:
on (release) {
_root.currentClipPlaying_mc.play();
}
So, for example, if the instance name of the MC is "exampleOne_mc", and I've used _root.currentClipPlaying_mc = this._name; that makes currentClipPlaying_mc = exampleOne_mc. Doesn't this mean that by saying this:
on (release) {
_root.currentClipPlaying_mc.play();
}
I'm actually saying this:
on (release) {
_root.exampleOne_mc.play();
}
Or do variables not work in a path?
On the main timeline I have one movie clip that has several stops within it. At the beginning of the MC, I stop the main timeline and let the MC play. Each time the MC comes to a stop it prompts the viewer to click the "next" button to continue. When I come to the end of the MC, I stop the MC and play the Main timeline ( _root.play(); ), which in some cases advances the main timeline to the next keyframe where another (different) MC plays and the process starts all over again (main timeline is stopped while the MC plays. Each time the MC stops, it prompts the user to click the "next" button, etc.)
My "next" button is on the main timeline and it tells the MC to play:
on (release) {
MC_instancename.play();
}
Currently, I have a different instance of the "next" buttton for each MC instance, but what I want to do is have one instance of the "next" button and just have it play whichever MC is currently on the timeline.
So I created a variable called currentClipPlaying_mc and at the beginning of the given MC, I set this variable to be the instance name of the movie clip:
_root.currentClipPlaying_mc = this._name;
_root.stop();
It seems simple enough that all I need to do with my "next" button is tell it to play the MC instance name that I've assigned to the variable currentClipPlaying_mc. Which I thought would be:
on (release) {
_root.currentClipPlaying_mc.play();
}
So, for example, if the instance name of the MC is "exampleOne_mc", and I've used _root.currentClipPlaying_mc = this._name; that makes currentClipPlaying_mc = exampleOne_mc. Doesn't this mean that by saying this:
on (release) {
_root.currentClipPlaying_mc.play();
}
I'm actually saying this:
on (release) {
_root.exampleOne_mc.play();
}
Or do variables not work in a path?