1 Reply Latest reply on May 29, 2009 4:38 PM by LittleMuscle

    Calling my custom component several times 'freezes' my browser

    LittleMuscle Level 1

      I have a component (Interf) that has a sub-component (Inter57) that has a sub-components (Interf57User)

       

      In my app, i declare a variable interf of type Interf [the base component]:

       

      [Bindable] public var AasInt interf:Interf = new Interf;

       

      then in a function i check to see if there is an instance of the Interf component on the stage and do a removeChild on it if there is.
      then i declaire a new instance of Interf57User and assign it to variable interf and add it to the stage:

       

      if (interfOnScreen) { this.removeChild(interf); }
      interf = new Interf57User;
      this.addChild(interf);
      interfOnScreen = true;

       

      The problem is that after running this function about 6 times, the browser 'freezes'
      And yes, Interf has/will have more then one sub component as will those sub-components.