I got a little problem in flash and I kinda run out of ideas…
my flash is pretty simple, with a hit test. I got 3 objects (only now,I will need probably more)
One is controlled by me and the other 2 are just standing still.
Basically its like that. If the MC controlled by me touches one of the other 2 MC’s it sets a var (lets say X) to something. like x=1; and if my MC does not touch that other MC x should be 0 but I kinda can’t figure out how to do that.
I made some little code and putted it on the 2 other MC’s:
onClipEvent (enterFrame) {
if (this.hitTest(_root.My_MC)) {
_root.X = 1;
} else {
_root.X = 0;
}
}
or something like that, the problem is that it works only on one of the 2 MC’s, on the other it does not work, it simply does not set X = 1 again
so Im goesing that the first one is setting x all the time to 0 but I need it to set it to 0 only once, so I was wondering if someone could help me with that. Or maybe there is a different code I could use to get it to work…