4 Replies Latest reply on Apr 29, 2010 1:34 AM by budge_frownie

    Buttons in an overlay

    budge_frownie

      Hi all

       

      Recently I created a simple flash text card animation with arrows allowing the user to scoll through the different cards. I wanted to go a step further and make an overlay so when the user rolls over it, it would expand showing a variety of buttons for them to click and link off to in different places

       

      this is where my problem began. I created to overlay as a movie clip and when a small arrow is rolled over the movie clip overlay_mc plays and expands to reveal the buttons and the rollout function causes it to contract. The buttons however are un-clickable and after some research i discovered this is because the overlay_mc clip acts as a layer over the buttons.

       

      Is there anyway I can create an overlay with the buttons remaining active? Help greatly appreciated

       

      Thanks!

        • 1. Re: Buttons in an overlay
          Ned Murphy Adobe Community Professional & MVP

          If you make the background of your movieclip the object with the rollover/rollout code, then you can have your buttons sitting a layer above it where they will be fully accessible.  You will have to add the rollover/rollout code to the buttons as well because when you rollover them you rollout of the background.

           

          Another way to do this would be to use AS3 where you can do all of your interactive code outside of the movieclip.

          • 2. Re: Buttons in an overlay
            budge_frownie Level 1

            thanks Ned. Do you mean adding a new layer in the overlay movie clip or on the main time line above the movie clip?

            The problem I faced was the rectangle that tweens upwards on the rollover is part of the overall movie clip and the buttons werent responding to roll overs or on(release) functions

             

            thanks

            • 3. Re: Buttons in an overlay
              Ned Murphy Adobe Community Professional & MVP

              If you didn't follow what I said, I'l try again.  As you have already seen, if you assign rollover/out code to the movieclip, you inhibit anything inside the movieclip from being able to interact with the mouse.  You need to have all of the objects that interact with the mouse inside the mouseclip.  You can create a background inside of the movieclip and use that to trigger whatever expansion takes place.  And the expnded background will have to carry the same rollover/out code, as will the button you want to be able to click.

              • 4. Re: Buttons in an overlay
                budge_frownie Level 1

                thanks again, have included a button in the mc to trigger the event and it seems to be working better and now just need to figure out the rollout functionality!