Var iy2:Number = l_y2 + Math.sin( t2 ) * p2 Var iy1:Number = l_y1 + Math.sin( t1 ) * p1 Var p2:Number = Math.sqrt( h2*h2 - r*r ) Var p1:Number = Math.sqrt( h1*h1 - r*r ) Var h2:Number = Math.sqrt( dx2*dx2 + dy2*dy2 ) īall.side = y1 > -r ? 1 : 0 Var h1:Number = Math.sqrt( dx1*dx1 + dy1*dy1 ) Var y2:Number = cosine2 * d圓 - sine2 * dx3 Var p2A:Number = Math.atan2( d圓, dx3 ) + Math.PI / 2 Var vy1:Number = cosine2 * ball.vy - sine2 * ball.vx Var vx1:Number = cosine2 * ball.vx + sine2 * ball.vy Var x2:Number = cosine2 * dx3 + sine2 * d圓 Step five: Call it into Action! ok now create a new layer and name it actions and F9 to open the actions panel and add the following script Step five: now pull in your graphic of choice and convert it to movieClip and give it an instance name of "ball" now double click into it and convert it again to a movieClip and give it the instance name of "m" Step four: now create a dragtext point by creating some text then f8 to creat a movieClip and name it "dragp" name each of them respectively "pin1" and "pin2" these will be called in the actionScript for later. Step three: now use the (R) rectangle tool and create a circle and put two of them on the stage. Step two: ok now you can import into the library a png of anything you wish, fish, angel, star, etc. Step one: create a new ActionScript 3.0 document and make the size 520px x 350px and make the frame rate 40FPS. in this tutorial you will learn how to create an elastic effect in Flash AS3.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |