-
Stoping a simple movieclip
Hey everyone,
My problem might sound real simple (and probably is), but I can't manage to stop a movie clip. Here's the structure of my .fla :
On the main canvass, I have a button. Let's call that button myButton. If I double-click myButton, I can access the objects that are under myButton. Among these objects, there is a movieClip (myClip). This clip starts right from the beginning.
I simply want myClip to pause whenever my mouse is over myButton. I tried to go on myClip (the one on the 'OVER' event of myButton) and add a clipEvent(load) and (enterframe) to tell him to stop, and it didn't work. I also tried to go on the rollOver event of myButton-> _root.myButton.myClip.stop(); , and it didn't work. What can I do?
Cheers everyone!
-
Senior Member
You cant tell a movieclip inside a button to do anything. Have the movieclip on the canvas instead, give it an instance name ( myMC ) and target it from the button.
on(rollOver){
myMC.stop();
}
on(rollOut){
myMC.play();
}
-
Senior Member
It sounds like your movie clip is inside the button, in which case its best to move it from there to place it on the same timeline as the button together in the same frame.
give the clip an instance name, myClip and the button the instance name myButton (obviously you can be more creative with the names if you want )
now add a frame action in the frame that contains both symbols,
code:
myButton.onRollOver = function() {
myClip.stop();
};
myButton.onRollOut = function() {
myClip.play();
};
hope this helps
-
Thanks fellas!! Really helped!
Still think that it's a bit odd that you can't control a movie that is within a button...
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
|