createLabel Part Deux

Dude, figured out why createLabel makes your text field invisible. Check this comment in the mx.controls.SimpleButton class for the createChildren method (called by extendee’s of UIObject):

create children objects. Components implement this method to create the subobjects in the component. Recommended way is to make text objects invisible and make them visible when the draw() method is called to avoid flicker on the screen.

Well blow me down… is that even possible? Anyway, makes sense now. I like how ever time I learn something, all of my current components are now wrong, hehe. Maybe I should just remain ignorant, then my code would R0cK!!!

Comments

7 responses to “createLabel Part Deux”

  1. Carlos Rovira Avatar

    Hi Jesse,
    Don’t you think that would be great that Nigel Pegg (as the creator of the v2 framework) post about things like this, so the Flash Community could benefit about all this knowledge…

    Regards,

    Carlos

  2. JesterXL Avatar

    I plead the 5th…

  3. nig Avatar
    nig

    Don’t you think Nigel has a lot of work to do, and isn’t actually paid to make posts in his blog, although he wishes he could have the time to do all of what everyone wants?…

    Regards,

    nig

  4. Carlos Rovira Avatar

    Hi Nig,

    I’m not sure if I say something bad before. I’m not native English, and maybe my english isn’t as well as I would, but I translate your comment as if I’m unfortunate with my comment.

    Just in case I want to apologize for any badly understood.

    Sorry.

    Carlos

  5. Oscar Trelles Avatar

    Nah… don’t sweat it Carlos, nothing wrong with your comment.

  6. Carlos Rovira Avatar

    Thanks Oscar, I’m thinking that I’m getting crazy with my poor english :).

  7. nig Avatar
    nig

    nothing really that wrong with my answer either. Everyone’s cool here.