Set WipeLeft and WipeRight with setStyle method
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
private function changeEffect():void {
if (myButton.getStyle("mouseUpEffect") == myWR) {
myButton.setStyle("mouseUpEffect", myWL);
}
else if (myButton.getStyle("mouseUpEffect") == myWL) {
myButton.setStyle("mouseUpEffect", myWR);
}
}
</mx:Script>
<mx:WipeRight id="myWR" duration="1000" />
<mx:WipeLeft id="myWL" duration="1000" />
<mx:Button id="myButton" label="My Button" click="changeEffect();" mouseUpEffect="{myWL}" />
</mx:Application>
Related examples in the same category