PDA

View Full Version : checkbox component (label not setting)


silentweed
07-18-2006, 08:01 PM
Hi,

I have a movieclip in my library with linkage name mcCheck. This movieclip contains a checkbox component with instance name cmpCheckbox. Using the parameter panel for the checkbox i have removed the label text.

Now I am trying yo dynamically populate the checkbox label but it doesnt seem to be working: any help would be appreciated..am i missing somethign obvious?


var checkbox = _root.attachMovie("mcCheck", "mcCheck", _root.getNextHighestDepth());

trace(checkbox.cmpCheckbox); // this gives _level0.mcCheck.cmpCheckbox hence path is correct
checkbox.cmpCheckbox.label = "hello"; //this does not do anything the label remains empty

trace(checkbox.cmpCheckbox.label); //this traces out "hello"


Any help appreciated..

cheers

silentweed
07-19-2006, 01:54 PM
Im now using a dynamic text field instead of a label for the above..but for learning purposes was just wondering WHY doesnt the above work ..

cheers in adavnce