A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: removeChild questions

  1. #1
    Senior Member
    Join Date
    Dec 2006
    Location
    Jax, FL
    Posts
    110

    removeChild questions

    I created a class for a saTextbox. It has several other classes it calls within the package.
    var tb:saTextBox = new saTextBox();
    addChild(tb);

    When I try to removeChild(tb) it should set the var tb to null.
    Well, it does not. It holds the Object saTextBox.
    Any suggestions on why it doesn't set the variable to null?
    Could there be variables within the saTextBox class that do not allow it null?

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    Quote Originally Posted by imdumb View Post
    When I try to removeChild(tb) it should set the var tb to null.
    Well, it does not. It holds the Object saTextBox.
    Any suggestions on why it doesn't set the variable to null?
    You remove tb from its parent. This doesn't mean the object ceases to exist.
    If you want tb to be null after you remove it from its parent, do it manually by adding tb = null;

  3. #3
    Senior Member
    Join Date
    Dec 2006
    Location
    Jax, FL
    Posts
    110
    I was doing that, thanks. Just wanted to make sure I was not missing something by adding the tb=null; without need too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center