3 Replies Latest reply on Oct 23, 2009 6:59 AM by Ned Murphy

    Complex rollover - I can't get this to work. Please help!

    grynchman

      I tired this tutorial several times over:

       

      http://www.layersmagazine.com/flash-button-animation.html

       

      I realize this is AS2. I tried it in using that as well as AS3 (I'm TOTALLY new to this).

       

      Here's the fla file I ended up with:

       

      http://aaronpenton.net/fla.html

       

      When I preview the movie, it's empty.

       

      Firstly - can anyone help me as to why?

       

      Secondly, how can/should I achieve this with AS3? I just want to be able to mouse over and have the text shift right and an image appear to the left, as in the tut.

       

      ANy help greatly appreciated.

       

      Thank you.

        • 1. Re: Complex rollover - I can't get this to work. Please help!
          Ned Murphy Adobe Community Professional & MVP

          First, you need to have something on the stage in order for something to appear in your file when you play it.  So when you open the file, drag an instance of the completed button movieclip onto the stage.

           

          Next, in your button movieclip, on the layer you named hit area, you can see in the first frame where you added code into the first frame.  That type of code needs to be attached to the button and not placed in the keyframe.  So copy/cut it and then click on the button itself and then paste that code into the Actions panel.  If you do not see the code symbol in the timeline you have done it correctly.  That should be all you need to do.

           

          Just as a note: Where you originally had that code is the better place for code because it is easy to locate, it's just that that type of coding is designed specifically for placing on objects.  To place the code where you did, you would give your button an instance name (for example, "myButton") in the properties panel and then assign somewhat similar code to it, such as...

           

          myButton.onRollOver = function(){

               gotoAndPlay("s1");

          }

           

           

          myButton.onRollOut = function(){

               gotoAndPlay("s2");

          }

           

           

          myButton.onRelease = function(){

               getURL(...etc);

          }