Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
nball

Using movieclip as motion path

Recommended Posts

Warning: n00b question!

 

I'd like to use TimelineMax to animate clips along other clips. The examples I can find using MotionPath all utilize generated paths vs. hand drawn paths. Can I simply designate hand drawn paths (which are mc's) using MotionPath?

 

 

Link to comment
Share on other sites

Sorry, there is no way for us to parse Bezier data from a hand-drawn path in Flash.

 

Although somewhat limited, compared to MotionPaths, you could create a MovieClip in flash with a guided animation and then add tweens to your TimelineLite/Max that use the FramePlugin to control those movie clip animations:

 

http://www.snorkl.tv/2010/10/overview-of-tweenmax-framelabel-and-frame-plugins-nifty-way-to-play-a-flash-timeline-backwards/

Link to comment
Share on other sites

YOu can do this somewhat at dev time, not at runtime as far as I'm aware of though.

 

Save this into a JSFL file, and do a run command from within flash with a shape selected. Your milage may vary but it should get you the points of an object.

var vertices = fl.getDocumentDOM().selection[0].vertices;

//getting the points and trace them
for(var i = 0; i < vertices.length; ++i)
{
	fl.trace(vertices[i].x + "," + vertices[i].y);
}
  • Like 1
Link to comment
Share on other sites

Thanks for the quick replies! I attempted several methods of extracting the vector data, here's one in particular that looked good: http://stackoverflow.com/questions/1836758/flash-how-to-read-data-from-shape-graphics-object

 

In the end I just used the old fashioned method. Next time I will draw the paths programmatically. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×