クリックするとランダムに移動する
btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(event:MouseEvent):void {
btn.x += Math.random() * 100;
btn.x -= Math.random() * 100;
if(btn.x >= 400 || btn.x <= 0){
btn.x = 200;
}
btn.y += Math.random() * 100;
btn.y -= Math.random() * 100;
btn.y +=
btn.y -= Math.random() * 100;
if(btn.y >= 300 || btn.y <= 0){
btn.y = 150;
}
}