문제

I'm using as2 and coding from the main timeline, (using Flash Develop) because my teacher says I have to.

Here is the issue i am facing.

    _root.playBtn.onPress = function () 
    { 
        _root.gotoAndStop("level1");
        //picha = true;
        _root.attachMovie("picha", "player", _root.getNextHighestDepth());
        _root.player._x = 300;
        _root.player._y = 200;


    }

when I press the play button, the movie clip is added and called "player".

    _root.hud.backBtn.onPress = function () 
    { 
        _root.gotoAndStop("start")
        _root.removeMovieClip(_root.player);
    }

But when I press the back button to go back to the menu, the player is not removed.

도움이 되었습니까?

해결책

_root.player.removeMovieClip();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top