<?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"> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> <s:Animate id="mover" target="{button1}" duration="1000"> <s:SimpleMotionPath property="x" valueFrom="0" valueTo="100" /> <s:SimpleMotionPath property="y" valueTo="100" /> <s:SimpleMotionPath property="width" valueBy="20" /> </s:Animate> </fx:Declarations> <s:Button id="button1" label="测试" click="mover.play()"/> </s:Application>
简单的flex4动画特效,放这里收藏学习!