5 Replies Latest reply on Jul 31, 2006 1:01 AM by Clepsidra

    Movie clip rollout

    Clepsidra
      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
        • 1. Re: Movie clip rollout
          Tolk Level 1
          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!
          • 2. Re: Movie clip rollout
            Clepsidra Level 1
            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?
            • 3. Re: Movie clip rollout
              Wolf_van_Ween Level 1
              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))
              • 4. Re: Movie clip rollout
                Clepsidra Level 1
                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.
                • 5. Re: Movie clip rollout
                  Clepsidra Level 1
                  The answer:

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

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