遅れてついてくるボール
♥0 |
Line 18 |
Modified 2010-04-26 19:25:30 |
MIT License
archived:2017-03-20 00:40:14
ActionScript3 source code
/**
* Copyright 084 ( http://wonderfl.net/user/084 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/u0ZP
*/
package{
import flash.display.Sprite;
import flash.events.Event;
public class Extra2 extends Sprite {
private var icon:Sprite = new Sprite();
public function Extra2() {
icon.graphics.beginFill(0xff6600);
icon.graphics.drawCircle(0, 0, 15);
icon.graphics.endFill();
addChild(icon);
addEventListener(Event.ENTER_FRAME, IconMove);
}
private function IconMove(event:Event):void {
//icon.x = mouseX;
//icon.y = mouseY;
icon.x += (mouseX - icon.x) / 3;
icon.y += (mouseY - icon.y) / 3;
}
}
}