0

I have a car that drives around a map named "car" that's within a movieclip named "map". I have a character named "player" who has 2 frames, "norm" which contains another movieclip named "playerNorm" which is the normal state of the character. In "dead", the character is dead. I want it so that when "player" collides with "car", "player" will show it's "dead" state.

stop();
onEnterFrame = function ()
{
    if (_root.playerNorm.hitTest(_root.car))
    {
        this.gotoAndStop("dead");
    }
};
4

1 回答 1

0

尽管您不清楚您的问题是什么,但我认为它是您想要的“上面的代码片段不起作用”。如果是这样,那么您需要更换:

this.gotoAndStop("dead");

_root.playerNorm.gotoAndStop("dead");
于 2013-02-10T15:42:06.370 回答