Jump to content
Search Community

Discontinuous Motion Path

protoemocional test
Moderator Tag

Recommended Posts

In line with my most recent question...

 

I know that whenever you define a LinePath2D, each point in an array is joined with the last point in order to create one single line. This is typical of a vectorial-style drawing.

 

Is it possible to set a discontinuous path, like in my picture, where 1, 2, and 3 define different trajectories that form a single path? In this way, whenever a shape finishes a line, it is immediatly 'teleported' to the next line.

 

I reckon you can do this with Timelines, but perhaps this is not the best way, if at all...

 

Thank you very much, and congratulations for your engine.

Link to comment
Share on other sites

Sure, that'd be relatively easy using 3 TweenMax.fromTo() calls and tucking them in a TimelineLite or TimelineMax. Kinda like:

 

var tl:TimelineLite = new TimelineLite();
tl.append( TweenMax.fromTo(mc, 1, {y:0}, {y:400, ease:SteppedEase.create(5)}) );
tl.append( TweenMax.fromTo(mc, 1, {x:200}, {x:400, ease:SteppedEase.create(2)}) );
tl.append( TweenMax.fromTo(mc, 1, {x:500, y:400}, {y:600, ease:SteppedEase.create(2)}) );

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.
×
×
  • Create New...