The position of the object(オブジェクトの位置指定)
♥0 |
Line 20 |
Modified 2012-04-27 10:46:28 |
MIT License
archived:2017-03-10 04:26:41
ActionScript3 source code
/**
* Copyright vinton ( http://wonderfl.net/user/vinton )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/iShY
*/
// forked from vinton's Moving an object(オブジェクトの移動)
// forked from vinton's Rotation an object(オブジェクトの回転)
package{
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite{
private var rect:Sprite;
public function Main(){
rect = new Sprite();
rect.graphics.beginFill(0xFF0000);
rect.graphics.drawRect(0, 0, 100, 100);
rect.graphics.endFill();
rect.x = 0;
rect.y = 182.5;
addChild(rect);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(event:Event):void{
rect.x = 300;
}
}
}