I got this effect from a very good French Flasher. I found
the code on his site,
flasheur.com , broke it down, and improved it a little
bit, all this just for you.
You'll find that in this tutorial, I also took the code from
the
Random motion tutorial, that I use the
swapDepths and duplication functions, and a lot of
actionscript-based motion.
So that's not an easy tutorial, and you'd better check the
other tutorials before attempting this one.
Take a
look at the effect:
[ see the bacteria melt? ]
You can grab an incomplete source to get you started by
clicking here.
Now, what we want is that the bacteria move randomly. We
need to put Supra's random motion code to the circle, and
make so that the outline follows somehow the fill.
We also need to duplicate our bacterium, so that there are
more than one on the scene
Create a new layer that you'll name code and add this
code:
If you look very closely, you'll see that I removed two or three lines from the move() and reset function.

| Note |
_root. in front of shadow is
necessary, because we are now in
_root.controller,
so writing shadow._x would be
equivalent to _root.controller.shadow,
which doesn't exist (arrow with the X on it). To get to
shadow, you have to go through _root. See the difference
?![]() |
We get to the real actionscript part of the effect. We want
to duplicate our little bacteria, and make them all move,
and also make it so that it looks like they melt one into
each other.
In the code layer, under the random motion code, we are
going to put the duplication code.
Everybody OK? I admit this isn't
really simple.
duplicateMovieClip (_root.circle, "circle"+i,
50+i);
This means you duplicate the movie
_root.circle
under the name "circle"+i in level
50+i.
At the beginning, i=1, so the name
of the duplicate will be circle1 and it will lay on
level 51. Logical. And so on and so forth 11 times
because of the do... while loop.
| Note |
| What we just wrote is certainly the most important thing in the tutorial. I don't know if you noticed, but the circles are loaded between level 51 and 61, whereas outlines are loaded between level 1 and level 11. This means that the fills will always be on top of the outlines. That's the way we can get that melting effect. If we hadn't done that, the outline of the 11th bacteria would cover all the other fills. |
That's it ! Finished ! Save your
work, and test the movie.
That last bit of code looks a lot like the one we first put
in the controller. The difference is that we loop so
that all the shadows follow their circle, and
that we have to give a general formula of the path to get to
the shadows and the circles. I like those NOTE things...
| Note |
|
Whenever you have duplicates generated by a loop, you're
going to need this notation. Let's see how it works. _root["shadow"+i]._x Flash reads that and thinks : hmm... _root[] is equivalent to _root. except that here you ask Flash to evaluate what's between the []. Here we have a string, "shadow", and a number, i, that are concatenated with the + operator (this means put one after another). So flash reads _root., then shadow1 if i=1 for instance, and finally ._x = _root.shadow1._x This technique has a wonderful advantage : you don't have to know the name of your movie clips !! |
This
tutorial is written by Ilyas Usal. Ilyas is also known as
ilyaslamasse
on the
kirupa.com forums!
pom
![]()
Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.
Your support keeps this site going! 😇

:: Copyright KIRUPA 2026 //--