|
Create a file:
CompositeDemo.mxml
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundAlpha="0"> <mx:Script> import mx.effects.*; public function emphasize():void var m:Move = new Move(img); var r:Resize = new Resize(img); p.addChild(m); public function deemphasize():void var m:Move = new Move(img); var r:Resize = new Resize(img); p.addChild(m); </mx:Script> <mx:Panel title="Parallel Effect Demo [Programmatic Approach]" width="100%" height="100%"> <mx:Canvas id="canvas" width="100%" height="100%"> <mx:Image id="img" x="20" y="20" width="30" height="60" </mx:Canvas> <mx:ControlBar> </mx:Panel> </mx:Application> |