
<?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="init()" > <fx:Declarations> <s:Sequence id="effect" target="{boxes}"> <s:Fade alphaFrom="{boxes.alpha}" alphaTo="1"/> <s:Scale scaleXTo="1" scaleXFrom="{boxes.scaleX}" scaleYTo="1" scaleYFrom="{boxes.scaleY}"/> </s:Sequence> </fx:Declarations> <s:Group id="boxes" alpha=".2" x="20" y="20" scaleX=".5" scaleY=".5" rollOverEffect="{effect}"> <s:Rect width="200" height="200"> <s:fill> <s:SolidColor color="black"/> </s:fill> </s:Rect> </s:Group> </s:Application>
以上为串行效果,使用Sequence
一下为并行效果,使用Parallel

<?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="init()" > <fx:Declarations> <s:Parallel id="effect" target="{boxes}"> <s:Fade alphaFrom="{boxes.alpha}" alphaTo="1"/> <s:Scale scaleXTo="1" scaleXFrom="{boxes.scaleX}" scaleYTo="1" scaleYFrom="{boxes.scaleY}"/> </s:Parallel> </fx:Declarations> <s:Group id="boxes" alpha=".2" x="20" y="20" scaleX=".5" scaleY=".5" rollOverEffect="{effect}"> <s:Rect width="200" height="200"> <s:fill> <s:SolidColor color="black"/> </s:fill> </s:Rect> </s:Group> </s:Application>

<?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="init()" > <fx:Declarations> <s:Parallel id="effect" target="{boxes}"> <s:Fade alphaFrom="{boxes.alpha}" alphaTo="1"/> <s:Scale scaleXTo="1" scaleXFrom="{boxes.scaleX}" scaleYTo="1" scaleYFrom="{boxes.scaleY}"/> </s:Parallel> </fx:Declarations> <s:Group id="boxes" alpha=".2" x="20" y="20" scaleX=".5" scaleY=".5" rollOverEffect="{effect}"> <s:Rect width="200" height="200"> <s:fill> <s:SolidColor color="black"/> </s:fill> </s:Rect> </s:Group> </s:Application>