ローカルx座標
♥0 |
Line 18 |
Modified 2009-09-22 02:06:40 |
MIT License
archived:2017-03-20 17:55:59
ActionScript3 source code
/**
* Copyright kenta ( http://wonderfl.net/user/kenta )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/c4Ee
*/
package {
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
public class Dock extends Sprite {
private var tf : TextField = new TextField();
function Dock(){
addChild(tf);
tf.width = 300;
graphics.lineStyle(0,0x000000);
graphics.drawRect(0,0,300,80);
addEventListener(Event.ENTER_FRAME, IconMove);
}
private function IconMove(event:Event) : void {
tf.text = "ローカルx座標:" + mouseX
+ "\nローカルy座標:" + mouseY;
}
}}