xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="createEffect(event);">
// 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);
}