-
infidel!
how do I make this?
hi...
I need to make an object to get from point A to point B, following the dotted path.. How can I do that?
tnx,
ovidiu
-
Senior Member
you could either do some fairly complex math or a motion guide
-
infidel!
really? I would like to know some AS ideeas to implement that... no motion tween...
-
Senior Member
this should do it
code:
var r:Number = 100;
var a:Number = 0;
var startPoint:Number = 200;
var myMC:MovieClip= yourMovieClip;
this.onEnterFrame = function() {
// trace(r);
myMC._x = r*Math.cos(a)+startPoint;
myMC._y = r*Math.sin(a)+startPoint;
r--;
a += .2;
if (r<0) {
r = 0;
}
};
-
infidel!
works like a charm.. tnx a lot!
ovidiu
-
Senior Member
yw, i hope you can adapt it to work like you want
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
|