Copy link to clipboard
Copied
flash has every easy even code snippet for Animate horizontally .
but what about curve path ? i searched internet a lot for this but did not get any satisfactory easy to to animate along this curve . i need code . no motion tween
can you suggest me any blog or article for that?
note : i will draw curve using brush tool so pls refer no code to draw curve , rather give me code for the movieclip (ex: man ) to run on the curve

use:
stage.addEventListener(KeyboardEvent.KEY_DOWN,keydownF);
function keydownF(e:KeyboardEvent):void{
if(e.keyCode==whatever){
skateboarder.play();
}
}
Copy link to clipboard
Copied
One way to do this is to duplicate the blue line onto a new layer. Then you can make that layer a guide layer for the character. Here's a useful tutorial on the concept: Flash Guide Layer Tutorial
Copy link to clipboard
Copied
i don't really think you want to use actionscript for that motion, but if you do, you can use greensocks' bezier plugin for tweenmax. otherwise, use a guide layer like rob suggested.
Copy link to clipboard
Copied
its a simple car game sir . i just need to run the man in the curve using up arrow key . thats all
Copy link to clipboard
Copied
read that guide layer tutorial.
Copy link to clipboard
Copied
sorry, i need to run it using keyboard event . guide layer is for only animation . i need event handling
Copy link to clipboard
Copied
use:
stage.addEventListener(KeyboardEvent.KEY_DOWN,keydownF);
function keydownF(e:KeyboardEvent):void{
if(e.keyCode==whatever){
skateboarder.play();
}
}
Copy link to clipboard
Copied
is acceleration possible for this guide method ? because we are not using value here . so how will we multiply value to accelerate ?
thansj
Copy link to clipboard
Copied
yes, you can use any of the easing properties available in animate.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more