flash on 2010-3-28

by Kay
Tween Test
♥0 | Line 23 | Modified 2010-03-28 01:34:54 | MIT License
play

ActionScript3 source code

/**
 * Copyright Kay ( http://wonderfl.net/user/Kay )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/nuUM
 */

/*
 * Tween Test
 */
package {
	import flash.display.Sprite;
	import fl.transitions.Tween;
    import fl.transitions.easing.*;
    public class FlashTest extends Sprite {
    		private const SW:Number = stage.stageWidth;
    		private const SH:Number = stage.stageHeight;
        public function FlashTest() {
			var circle:Circle = new Circle();
			circle.y = SH/2;
			addChild(circle);
			new Tween(circle, "x", Elastic.easeOut, 0, SW/2, 3, true);
        }
    }
}
import flash.display.Shape;
class Circle extends Shape {
	public function Circle():void {
		graphics.beginFill(0xff0000);
		graphics.drawCircle(0,0,50);
		graphics.endFill();
	}
}