Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Sergey Snegirev

Pipe flow animation along MotionPath

Recommended Posts

Hi,

for a medical project I need to animate liquid slowly flowing up a pipe, much like those old pipe games. Here's a tutorial using manual tweens - http://www.computerschool.net/flash/fl_exercise25.html. I need the same result, only using code, because I have like a million of those pipes.

 

Using an array of Points(), I can create a greensock MotionPath and send a Path Follower along it. But I need the follower to sort of leave trail, to color the pipe behind it. 

 

I am thinking of creating a separate shape and drawing a LineTo(followerX, followerY) on each Path update. But is there an easier way, a property or method that Greensock offers? Any other ideas are very welcome, too.

 

Thank you!

  • Like 1

Share this post


Link to post
Share on other sites

Yeah, there is nothing in the platform that will directly support that, hooking into the lineTo and other AS3 drawing API methods is definitely a good idea. 

 

It seems you already know how to do that, but for anyone else swinging by here, this tutorial: http://www.snorkl.tv/2011/04/tweenlite-meets-flash-drawing-api-for-animated-line-drawing-fun/ shows how to draw a line as an object gets tweened through various points via a TimelineLite. 

  • Like 2

Share this post


Link to post
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.

×