Skip to main content
July 20, 2006
Answered

Movie clip rollout

Hi all!

I have a movie clip with three buttons inside, and i want when you roll out the movie clip, movie goes to frame 1. I have tried different possibilities , but when roll out works, buttons don't, and viceversa.

How can i do it without lose the buttons functionality?

Thanks for all,
Clepsidra
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer
July 31, 2006
The answer:

http://www.tutorial-enlace.net/tutorial-Menu_desplegable-531.html

It's in spanish, but it works!!! :D

5 replies

Correct answer
July 31, 2006
The answer:

http://www.tutorial-enlace.net/tutorial-Menu_desplegable-531.html

It's in spanish, but it works!!! :D
Translate
July 31, 2006
I'm sorry but if i keep onRollOut on the movieClip, when i'm over someone button, flash detects this action like a rollOut for the movieClip.
Translate
July 20, 2006
Keep your onRollOut for the movieClip, but add a onPress. In this onPress you hitTest for the three buttons, and perform the necessary actions that so far are on your buttons.
If you want the buttons to react visually, you need to change them into movieClips, and remote control them from the parent movieClip's onPress and onRelease handler (e.g. button1_mc.gotoAndStop(2))
Translate
Inspiring
July 20, 2006
When you assign a mouse event method to a movieClip you can no longer use mouse event methods for all it's child objects (stuff inside it).
Work around:
Place another movieClip inside your current movieClip, send it to the back (or so that it is behind all the buttons you want to use) and make it large enough so that it its edges expanding over the whole movieClip ( I normally use the movieClip background to do this, but you can use a solid fill movieClip and just set it's alpha to zero if you like).
Add the onRollOut events to this new movieClip.
Use _parent.gotoAndPlay(1); to send the initial movieClip to frame 1.
Because the buttons are no longer child objects of the movieClip your using to detect onRollOut they will retain their mouse event functions.
So your setup is like this:

Your movieClip contains ---> (detectorMovieClip, yourbutton1, your button2 .....)

Hope that all makes sense!
Translate
July 20, 2006
Thanks for your answer.

I have tried your suggestion, but the problem is the follow:

If i add the onRollOut event to this new movieClip (detectorMovieClip), when i do a rollover event on someone of the buttons, this new movieclip interpretate this action like a rollOut.

So that this solution can't helps me. Some other idea?
Translate