0 Replies Latest reply on Apr 26, 2007 11:33 AM by GenePilot

    Why am I getting an error with addChildAt?

    GenePilot
      I created a main class which is declared in fhe following manner:
      public class main extends Sprite

      Within the constructor I call init(). Within init I have the following two lines of code:
      var lBackground = new Back(); // Back is my background Symbol
      this.addChildAt(mBackground, 2);

      This causes the following error:
      RangeError: Error #2006: The supplied index is out of bounds.

      What's going on???