In this example we create a MX effect using Actionscript. The package of MX effect is mx.effects.*. Inthis example we create a WipeDown effect using Actionscript.
|
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"xmlns:s=" library://ns.adobe.com/flex/spark"xmlns:mx=" library://ns.adobe.com/flex/mx"minWidth=" 955" minHeight="600"creationComplete="effect(event);" > <fx:Script><![CDATA[ // Effect package for all effects import mx.effects.*; // Create a variable for WipDown Effect private var myEffect:WipeDown; private function effect(event:Event):void{ // Make a object of WipeDown EffectmyEffect= new WipeDown(); // Set the duration of the effectmyEffect.duration=1000; // Assign this effect to the componentroseindia.setStyle( 'mouseDownEffect', myEffect);} ]]> </fx:Script> <s:Panel title="Create MX Effect using Actionscript Example"width=" 487" height="275"chromeColor=" #000000" color="#CCCCCC"> <mx:ApplicationControlBar width="485" horizontalAlign="center"> <s:Label text="Click on image and show the effect."fontFamily=" verdana" color="#000000"/> </mx:ApplicationControlBar> <mx:Image id="roseindia"source=" @Embed(source='file:/C:/work/bikrant/image/bridge.png')"x=" 181" y="63"/> </s:Panel></s:Application> |

To view this page ensure that Adobe Flash Player version 10.0.0 or greater is installed.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.