1 Reply Latest reply on Jul 21, 2006 10:41 AM by dimival

    set hideEffect from actionsript

    mike2281 Level 1
      How do you set an effect such as hideEffect from actionscript?
        • 1. Re: set hideEffect from actionsript
          dimival Level 1
          Here is an example taken from the Developer's Guide, you need to create the Effect object, set its properties and then assigning it to a component using the setStyle function.

          Hope it helps

          <?xml version="1.0"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="createEffect(event);">
          <mx:Script>
          <![CDATA[
          // Import the effect class.
          import mx.effects.*;

          // Define effect variable.
          private var myWL:WipeLeft;

          private function createEffect(eventObj:Event):void {

          // Create the WipeLeft effect object.
          myWL=new WipeLeft();

          // Set the effect duration.
          myWL.duration=1000;

          // Assign the effects to the targets.
          myButton.setStyle('mouseDownEffect', myWL);
          myOtherButton.setStyle('mouseDownEffect', myWL);
          }
          ]]>
          </mx:Script>
          <mx:Button id="myButton"/>
          <mx:Button id="myOtherButton"/>
          </mx:Application>