|
-
Parent/child variable
I'm trying to control a movieclip from the parent. I need to run the same movieclip differently depending on what's happening in the parent.
On the parent timeline, I declare the variable and set it.
var Loop;
var LoopCounter;
LoopCounter = 1;
I want the movieclip timeline to loop in some cases and not others, hence the variable here.
if (Loop==false) {
play();
movGametic.play();
}
In the movieclip, I have an action on a frame that replays a set of frames unless the Loop variable is set to false. So once it's looped 5 times it will continue playing. (at other points, this doesn't happen, hence the variable).
LoopCounter = LoopCounter + 1;
if (LoopCounter > 5) {
Loop = false;
}
I'm sure there's a way to do this other than the way I've set it up, but I'd also like to understand how to pass these variables.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|