Hey, this is the first time I've really ever used a forum to ask a question. I am making a space shooting game with flash, and I am trying to make a weapon change pick up. I want to be able to hover over it and change my weapon by using a “hitTest”. The code I have for my weapon is this:

onClipEvent (load) {
laserMoveSpeed = 30;
this._x = _root.player._x+40;
this._y = _root.player._y;
-20;
}
onClipEvent (enterFrame) {
this._x += laserMoveSpeed;
if (this._x>900) {
this.removeMovieClip();
}
}

Because this is the first time I’ve ever done anything with actionscript accept for making buttons etc, I mainly used my timeline instead of using variables. So I was wondering if there was a way I could change the look of my ammunition. I’ve tried using the following already:

onClipEvent (enterFrame) {
if (this.hitTest(_root.tlpickup)) {
_root.tlpickup.gotoAndPlay(51);
_root.laser.gotoAndStop(2);
}
}

“_root.tlpickup.gotoAndPlay(51);” – This makes the pickup icon disappear. This worked
“_root.laser.gotoAndStop(2);” – This was supposed to change the appearance of the event “laser”, but it didn’t work.

I also tried adding a new Movieclip and removing the old one, but it also didn’t work. Maybe I did something wrong.

If you have any suggestions, It would be gratefully appreciated.