1 Reply Latest reply on May 8, 2008 9:51 AM by William Langley


    ooba Level 1
      Out of curiosity, what would occur if you were to call
      this.createEmptyMovieClip("myMCArea", this.getNextHighestDepth()); more than one time?

      Would you have 2 movie clips called myMCArea? If so how would you reference one over the other?
      Not that I would do this, but I am wondering if Flash has a built in protection against accidentally trying to use the same name twice?
      Kind of like
      var asd:String = "a";
      var asd:Number = 0;
      To me this should throw an error as you are declaring the same var twice. If one was global and one was local then I'd say it was ok, but with both being set on a global level I would expect Flash to not like this.

        • 1. Re: createEmptyMovieClip
          William Langley
          the effect is the same as when you put multiple same named mcs on stage in the timeline. Flash knows there are multiple mcs, but will only address the first one. They're like dead limbs. If you try to access by depth, Flash still addresses the first instance only. Obviously some built-in protection against recursion.