1 Reply Latest reply on Oct 21, 2010 6:32 AM by Ned Murphy

    How to make flash play movieclip for rollout effect on button

    Eileen Kelly Level 1

      I am using AS2 and I'm trying to figure out how to do a RollOut effect using buttons and getting nowhere. You'd think it would be easy!

       

      I have a movieclip within the "over" section of my button, which contains both an roll over and a roll out animation. My problem is that I cant seem to get flash to play the rollOut animation.

       

      I placed the following code in the button itself

       

      on (rollOut) {
          this.start_mc.gotoAndPlay("mouseOut");
      }

       

      Does anyone have any suggestions? I tried setting up a function to find when the user rolls off the button but it didn't work either. Any help would be very much appreciated.

       

      Thanks!
      Eileen

        • 1. Re: How to make flash play movieclip for rollout effect on button
          Ned Murphy Adobe Community Professional & MVP

          Code inside a button will not work.  The code you show would have to be attached to the button, but a button only has the properties that Flash defines for it (unlike movieclips where you can assign all the properties you like).  So you wouldn't be able to target a movieclip inside a button symbol because the button does not have such a property.

           

          Buttons are self animating objects.   You do not need to code to make them perform rollover/rollout animations.  But a button does not have a rollout frame, just the Up frame.  So you would need to have your rollout animation be in the up frame, where it settles to be the button as you see it without interacting with it.

           

          What you might try instead of using a button is to use a movieclip as a button,  Then you can control which frame it is in as you wisdh as well as command things within it to function.