Just a note on removeMovieClip()

Well I made a mistake while working with classes and this function…

There are 2 types of removeMovieClip() method…

  1. method in MovieClip Class
    mc.removeMovieClip()

  2. global method
    removeMovieClip(target_mc);

Now the problem is…

If you use 2nd one in any class which extends MC class then it creates problem… and rather than removing target_mc it removes the class instance itself. So it is affecting class rather than target_mc

e.g.
Class myMC extends MovieClip
{
[indent]var target_mc:MovieClip;

[/indent]}



function removeChild()
{
[indent]// PROBLEM
// this removes the instance of myMC and not target_mc
removeMovieClip(target_mc);

// CORRECT
target_mc.removeMovieClip();
[/indent]}

/////
Just for the info… Let me know if it is totally correct…