3 Replies Latest reply on Jul 22, 2010 3:24 AM by Karthik R.

    What is the Actionscrip 3 code to add effects to button on rollover?

    learner_7n Level 1



      I am using the following code (Actionscript 3) to animate my button:


      import fl.transitions.Tween;
      import fl.transitions.easing.*;


      var HomeTween:Tween = new Tween(Home, "x", Elastic.easeOut, -500, 20, 5, true);




      function HomeClickHandler(event:MouseEvent):void {
          navigateToURL (new URLRequest ("http://www.google.com"));


      Button Name     : Home_Btn

      Instance Name   : Home


      I would like to give some effects to my button when I rollover my cursor on the button. And I would like to do it by using Actionscript 3. Could anyone guide me how to write code to get some variety animation effects?


      Thanks for the help.