Expansion on random movement

I have a two-fold question - most of it has already been touched on, but I am trying to focus on ActionScript instead of straight animation in order to achieve the results we desire…

I am trying to animate a box, where it fills with liquid (blood, to be exact). Now I am sure that there is some ActionScript code that will allow me to randomize the two points on either side of the box to fill it up (basically, every time it fills up, it will be different), but I am not sure how to connect the “fill” or top line to these two points and also, how to maintain a curviness to that fill line. Plus, that fill line must act as mask for the fill color, no?

Secondly, and this one might be much easier - I am looking for random motion and elasticity to the red and white blood cells that will fill this box once the liquid, or blood has reached top level. I would like them to move freely, smoothly, and bounce off each other with fluid resiliency.

Any ideas on this?

Thanks in advance!

Hi, i think i can help with the first part, but its kinda long to explain. So i’ll try and make a fla for you to look at that and i’ll try and explain it in there too.

As for the second part, it shouldnt be too difficult, then only major thing is to get the physics right. If you do a search for physics and collisions i’m sure you’ll get some formula’s. Or another forum member could help out here.

Regards,
Viru.

Thanks, Viru - I eagerly await your fla…

I do think I can do the second part without too much trouble. I will get working on that and wait for your second response!

Thanks again!!