Forked from: vinton's Rotation an object(オブジェクトの回転) diff:5 Move objects with the click(クリックでオブジェクト移動) vinton forked:1favorite:0lines:19license : MIT License modified : 2012-04-23 22:44:57 Embed Tweet // forked from vinton's Moving an object(オブジェクトの移動) package{ import flash.display.Sprite; import flash.events.MouseEvent; public class Main extends Sprite{ private var rect:Sprite; public function Main(){ rect = new Sprite(); rect.graphics.beginFill(0xFF0000); rect.graphics.drawRect(0, 182.5, 100, 100); rect.graphics.endFill(); addChild(rect); addEventListener(MouseEvent.CLICK, onMouseClick); } private function onMouseClick(event:MouseEvent):void{ rect.x = 300; rect.y = 0; } } } Code Fullscreen Preview Fullscreen MouseEvent.CLICK addEventListener MouseEvent addChild Sprite sort new page view favorite forked pv504 Move/Rotation/Expansion object.. vinton forked:0 favorite:0lines:23 (diff:11)