Flash actionscript 3.0: How to put 'U'shape Curve in AS 3.0

How to put 'U'shape Curve in AS 3.0

Posted by Sankar.G | Posted in | Posted on 5:28 PM

var angle:Number=0.05;
var radian:Number=0;
b1_btn.addEventListener(MouseEvent.CLICK,fun);
function fun(event:MouseEvent):void
{
ball_mc.y=351.9;
ball_mc.x=250;
addEventListener(Event.ENTER_FRAME,one);
function one(event:Event):void
{
angle+=0.05;
radian=Math.sin(angle)*3;
ball_mc.y=(351.9)-radian*180/Math.PI;
ball_mc.x+=2;
if(ball_mc.y>352.9)
{
removeEventListener(Event.ENTER_FRAME,one);
}
}
}

Create 2 MovieClip and Name it as b1_btn & ball_mc
and put this script and click the b1_btn button

Comments (0)