As3代码动画引用实例代码
代码如下 | 复制代码 |
import fl.motion.Animator; import fl.motion.MotionEvent; //flash cc生成 var ax1:XML = <Motion duration="10" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*"> <source> <Source frameRate="24" x="52.5" y="93.25" scaleX="1" scaleY="1" rotation="0" elementType="graphic" symbolName="???赢? 15"> <dimensions> <geom:Rectangle left="-52.5" top="-93.25" width="105" height="186.5"/> </dimensions> <transformationPoint> <geom:Point x="0.5" y="0.5"/> </transformationPoint> </Source> </source> <Keyframe index="0" tweenSnap="true"> <tweens> <SimpleEase ease="0"/> </tweens> </Keyframe> <Keyframe index="9" y="-118"/> </Motion> //引用循环播放 var city_animator:Animator = new Animator(ax1,ctmc); city_animator.play(); city_animator.addEventListener(MotionEvent.MOTION_END,afterMotion); function afterMotion(e:MotionEvent) { city_animator.play(); } |
补充:flash教程,As3.0