Am trying http://examples.adobe.com/flex2/inproduct/sdk/explorer/explorer.html to add the fade effects in flex by dynamically.But i cannot add the effects,here my code
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init();">
<mx:Script>
<![CDATA[
private var effect:String;
private function init():void {
effect="wipeOutleft";
}
]]>
</mx:Script>
<mx:WipeLeft id="wipeOutleft" duration="1000"/>
<mx:Image id="img" source="@Embed(source='assets/image002.png')" mouseDownEffect="{effect}" width="254" height="259"/>
</mx:Application>
You should make the
effectvariable bindable:This way, the value of
mouseDownEffectwill be updated when you set a new value ("wipeOutleft") toeffect.