Simple Animation
/**
* Copyright Wataru.Miyazaki ( http://wonderfl.net/user/Wataru.Miyazaki )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/x4ap
*/
package {
import flash.display.Sprite;
import flash.events.Event;
public class FlashTest extends Sprite {
public var sampleView:Sprite;
public function FlashTest() {
// write as3 code here..
sampleView = new Sprite();
sampleView.graphics.lineStyle(10, 0x00aa00);
sampleView.graphics.drawCircle(0, 0, 30);
addChild(sampleView);
addEventListener(Event.ENTER_FRAME, move);
}
private function move(e:Event):void {
var sampleX:Number;
sampleX = sampleView.x;
if(sampleX<100 ){
sampleView.x = sampleView.x+1;
}
}
}
}