Take the 2-minute tour ×

I've got this code:

public function doTextLabels():void
    myLabel.text = "A Label is here";
    myLabel.textField.background = true;
    myLabel.textField.backgroundColor = 0xDDDDDD;
    myLabel.move(200, 60);

It fails to work. I cannot think of any reason why not, but the Label shows up on the screen for 1 millisecond and then vanishes instantly again. : (

I've attached the Label to the UIBox as its parent. This has worked for me before, and I understand how it works... It should work!

But it isn't... what's up with it? I do EXACTLY this to a Slider and it appears and works perfectly. Why not this stupid label?

share|improve this question
+1 for using proper programmer's language of describing your problem :-) –  Darin Dimitrov Apr 2 '11 at 8:39
The question should actually be : "Stupid Flash Labels are stupid ?" :P –  Spyros Apr 2 '11 at 8:41
It's not possible that (200, 60) is outside of your window, is it? –  Gabe Apr 2 '11 at 8:44
@Gabe, it actually wasn't outside the window, tried that one a lot. :) –  AlexW Apr 2 '11 at 10:17
add comment

1 Answer

up vote 3 down vote accepted

Did you add the Label component to your Document Library (the panel at the side)?

Recheck to see if it is there.
It could be that your Slider is in the document library (maybe when you added it to the stage) but your Label is not.
You must add the components to the library before you can access it in ActionScript.

share|improve this answer
Dude you just helped me a lot. –  AlexW Apr 2 '11 at 9:09
add comment

Your Answer


