3
votes

I am looking for a simple AS3 script to move/follow a movieclip (arrrow) along a manually drawn path in flash. Like.. it moves for the start point if the line to the end point of the line, also should rotate at curves automatically.

Also is it possible to duplicate this movieclip (arrrow) tho specific distance, like a ground of arrows moving along a path continuously with specific distance from eachother?

I am working on few infoGraphs and need this arrows animation to show the workflow.

I desperately needs this, pls help!

Cheers, bp

1
Upvoting, just because I can't see why this is downvoted. MPO is that timeline animation does this so well that it seems silly to not use that, but the fact that you want to do something I can't see a reason for is not a legitimate reason to downvote.Amy Blankenship
this might help: kirupa.com/forum/…Daniel MesSer
If you need to script it have a look at [TweenLite](www.greensock.com/tweenlite/) and the BezierThroughPlugin. I think it also provides an option to orient the clip based on it's direction. The option is to do it manually in the Flash IDE: 1. draw a path which is the trajectory. 2. copy it. 3. select the movieclip(arrow) 4. create a motion tween and select it. 5. hit paste (ctrl+v/cmd+v) and the tween should have the path you drew as a trajectory. 6.optionally select the orient to path option for the tweenGeorge Profenza

1 Answers

1
votes

There could be libraries that help with this, as George Profenza mentions in his comment, and it is certainly possible to calculate points along a bezier.

However, a much simpler solution is to do what people have done since Flash 4. Draw the curve in Flash, then create a motion tween along the curve using an empty MovieClip. At runtime, you can use addChild() to insert your MovieClip as a child of the empty one. You will have a lot more manual control this way, compared to the bezier library.