The best way is probably good ol’-fashioned hittest:
// put this in the spaceship's code
if (hitTest(_root.asteroid) == true) {
tellTarget (asteroid) {
gotoAndPlay (first frame of explosion animation);
}
}
The only thing to watch out for is to make sure you get the relative location of the objects right, i.e. _root.asteroid, or whatever. Hope this helps.
Hi,
I’ve made some little correction on the script and upload it again for you. You didn’t add quotes for the passing framelaber ie… gotoAndPlay (exploid);
Some other modificitons also made. check out
Try try until you reach that is the Mantra.