##########ÁßÇб³ ¼öÇÐ ¾×¼Ç¿¡¼ ¾²´Â°Å################
Àý´ë°ª Ç¥Çö
onClipEvent(enterFrame){
distance = MAth.abs(this._y - _root._ymouse);
this._xscale = 100 - distance/4;
}
ÀÌÂ÷¿ø»óÀÇ Æò¸é»óÀÇ °Å¸®
ÇÇŸ°í¶ó½º °ø½Ä ÀÌ¿ë
c2 = a2+b2;
function distance(x1,x2,y1,y2)
{
var diffx = x2-x1;
var diffy = y2-y1;
var r =Math.sqrt(diffx*diffx + diffy*diffy);
return r;
}
»ï°¢ ÇÔ¼ö ¿ø¿îµ¿
onClipEvent(load)
{
var t =0; //°¢µµ ÃʱⰪ
}
onClipEvent(enterFrame){
this._x = 100 + 50*Math.cos(t);
this._y = 100 + 50*Math.sin(t);
t = t+0.1; // + ½Ã°è¹æÇâ - ¹Ý½Ã°è¹æÇâ
}
Áß½ÉÀÌ (100,100 ) ÀÌ°í ¹ÝÁö¸§ÀÌ 50ÀÎ ¿ø