I'm creating an animation where the user can drag charged
particles to a ruler...if they're the same sign, they repel each
other...if opposite signs, they attract each other...
Here's a list of things I want to have happen but am having
1. Particles pause for a second before beginning movement
2. Particles stop moving when they come in contact with each
3. Particles delete themselves after a few seconds of contact
4. Particles delete themselves when they run off stage
there's also an Energy Bar that I haven't really dealt with
yet...I'd like to get this straightened out first...
Had a look at the code and, well it would take me quite some
time to answer your questions using that code. So I typed up an
example that uses functions to perform the actions you need.
Basically I use objects to describe the particles and then pass the
objects around using (properties of) the object as parameters for
the functions. I've commented the code.
In my fla I have a mc in the library called particle and it
consists of a layer with a circle and a layer with a dynamic text
field (instance name = particle_txt). I've put two instances of the
particle mc on the stage (_y=40) -> instance names:
particle_clip1 and particle_clip2. Attach the code on a seperate
layer. Test movie and drag the two particles downwards (just like
in your movie, only I didn't use a hitTest_mc). Hope this helps.