How to make a MovieClip remove itself in AS3?

后端 未结 5 1471
不思量自难忘°
不思量自难忘° 2021-01-18 13:41

What is the equivalent to removeMovieClip() in AS3?

Apparently many have the same question:
StackOverflow:

  1. How to completely remove a
5条回答
  •  走了就别回头了
    2021-01-18 14:33

    If your animation is ending on frame 20.

    note: using 19 because flash count frames from zero(0) similar to array index.

    class animatedCloud
    {
    
        public function animatedCloud(){
            addFrameScript(19, frame20);
        }
    
        private function frame20(){
            parent.removeChild(this);
        }
    }
    

提交回复
热议问题