import flash.events.Event;
var x0:Number = 100,y0:Number = 200,k:Number = 50,disX:Number = 2,disY:Number = 1,i:Number = 0; ; ;var xx:Number = 0; ;var yy:Number = 0;graphics.moveTo(100,200);
addEventListener(Event.ENTER_FRAME,onEventFrame);
function onEventFrame(e:Event):void{ ; xx = x0 + i / disX; ; yy = y0-Math.sin(i*Math.PI/180)*k; ; ball.x = xx; ; ball.y = yy; if (yy==200) { trace("ball.x="+ball.x+"==i=="+i); } graphics.lineStyle(1,0xefefef,1); graphics.lineTo(ball.x,ball.y); ; ; i -= 5;;
if (i>disY*360) { ball.visible = false; ; removeEventListener(Event.ENTER_FRAME,onEventFrame); }}