Movie meets movie

hello everyone,
thanx for ur suberp tutorials…
i have a prob n know i can count on u…

so, i have 2 movie clips on the scene n what i want is that when 1 meets the other {without drag n drop…}, the latter starts playing…

i hope im explicit…
need ur help.
thanx in advance

sohan C

do you know about collision testing?

I’ll post an example of it in the morning if no one else has by then. I’d post it now, but I can’t remember the syntax off the top of my head.

Basicaly it’s a little a/s that checks to see if two movie clips are touching and then does something else (what ever you like) when they do touch.

“superbe” i meant sorry.

This is a simple hit test which I have attached to a basket ball back board in a shooting game.

onClipEvent (enterFrame) {
flag = this.hitTest(_root.ball);
if (flag == true) {
_root.ball.xVelocity = -2*_root.ball.xVelocity;

The on clip event enter frame sets it up as a loop. In this format it must be tagged to a M/C for it to work. In fact if you try to put it on anything but a Movie clip it simply will not paste into your action script panel.
So it loops and every time it does it checks to see if “this”, meaning the movie clip that this is attached to, is touching another movie clip named ball, on the main time line.
the stuff inside the {}'s is what the a/s should do if a hit is detected.

So a basic hit test looks like this

flag = myMovieClip.hitTest(myOtherMovieClip);
if (flag == true) {

If you need more info… write back. :slight_smile:

thanx upuaut8
i going to try this.
then ill write back.

sohan C