Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code for tweened flow using guide 2

Status
Not open for further replies.

SimJim

Programmer
Apr 7, 2003
26
0
0
KR
I have a very large animation of liquid flowing through bending pipes. I managed to create a tweened version with guide paths. However when I want more than one bubble to follow the same path, I end up with literally hundreds of tweened paths, each on their own layer. I need to figure out a much smarter way to create the multi-bubble flow along the various guides.

Anyone had experience coding tweens as opposed to using multi-timeline tweens?
 
Thanks Bill,

It looks like a tracer function. So I assume the object would be to have the other non-path-linked objects follow the primary object in succession. I need to read this several times through.

P.S. I responded to your PHP suggestion in that thread.
 
Bill,

This is interesting. I thought this sort of capability had been in the 2D world for eons. But the 3D guys beat them to it. Go to Discreet 3DS Max and read up on Reactor, which is actually a physics engine based on the work of Havok, a UK product. All the leading 3D animation programs use the Havok engine for advanced physics, and just rename it for their own needs (Maya, cinema4D, lightscape, etc).

I have an older 3D plug-in for 3DS MAX with the path tracking flow effect called particle studio. The nice thing about the horsefish stuff is that it is real time, and not rendered. With particle studio, you can specify a path, a flow rate, entropy, etc. and each little object follows their specified paths.

Is there a site where you can see all the decent components out there, and perhaps download them?

Does Horsefish have an email address?
 
You could outline the corner points of the flow and use code to work between them. Maybe something like this would be a starting point:

yArray = [0, 200, 300, 400, 100, 200];
pos = 0;
particle.speed = 1;
particle._x = 0;
particle._y = yArray[0];
this.onEnterFrame = function() {
pos++;
corner = Math.floor(pos/100);
particle._x += particle.speed;
particle._y += (yArray[corner]-particle._y)/10;
};

Which tracks a clip called 'particle' across the stage moving between different y levels as it goes. If you create a bunch of objects within a loop then they could all track the path at different speeds etc.

 
SimJim,

if you join the flashmacromedia group at yahoo,


search the archives for particle, you will find the threads relating to the development of the horsefish particle component. the author is ryanm in this group. his email address in the member page is out of date.

once joined i would post your question refering to ryanm previous work and i bet you have a working solution very quickly. this a very good group with some of the best actionscripters around as regular contributers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top