|
-
When in doubt ask
I have made changes in the actionscript to take care of your requirements.
The curve properties can be changed as required by you by selecting suitable values of, xb,ygb,vx, vy,and g.
I have designed only the basics. Fine tuning can be done by the users according to their needs.
Code:
var tx=0;//_x increment.
var ty=0;//_y increment.
var xb=100;//Inetial position of curve.
var ygb=300;//Bottom position of the curve.
var yb=ygb;
var vx=10;//Horizontal movement.
var vy=-20;//Vertical movement.
var g=2;//Try for various values.
var x1=xb;
var y1=ygb;
var x2;
var y2;
this.createEmptyMovieClip("mvc",this.getNextHighestDepth());
clear();
lineStyle(2, 0xff0000, 100, true, "none", "round", "miter", 1);
moveTo(x1,y1);
mvc.onEnterFrame=function(){
x2=xb+vx*tx;
y2=yb+vy*ty+0.5*g*ty*ty;
tx++;
ty++;
lineTo(x2,y2);
if(y2>ygb){
removeMovieClip("mvc");
}
}
Last edited by Eager Beaver; 03-20-2007 at 01:03 PM.
<signature removed by admin>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|