Hey people,
I am trying to get a MC to play when it collides with another MC named “light”. Here is my code. It is on the MC that I want to play (called “rap”)
[AS]
onClipEvent (enterFrame) {
if (this.hitTest(_root.light)) {
this.gotoAndPlay(2);
} else {
this.gotoAndStop(1);
}
}
[/AS]
the two MCs are called “rap” which is on the fuzzButt layer, and “light” which is just below it in the light layer.
Any help is appreciated. thanks!
yeah, i tried doing that first (only reading the coordinates on light, cuz thats the one that’s moving), but i couldn’t get it right, because, well, i dunno, it’s a bad day in flash for me i guess. lol! actually, i tried doign something like
[AS]
onClipEvent(enterFrame) {
if (_root.light._X>60 && _root.light._X<65)
{
this.gotoAndPlay(2);
} else {
this.gotoAndStop(1);
}
[/AS]
but… no workie. thanks for takin a look liam :beam: