AS3 TextField is blank, doesn't accept any of my settings??

Posted by Andy Melichar on Stack Overflow See other posts from Stack Overflow or by Andy Melichar
Published on 2010-03-11T21:06:35Z Indexed on 2010/03/11 21:09 UTC
Read the original article Hit count: 135

Filed under:
|
|

Having a strange issue with assigning a TextField to a movie clip.

            nameFormat = new TextFormat();
            nameFormat.size = 14;
            nameFormat.color = "0x000000";
            nameFormat.border = true;
            nameFormat.font = "Arial";
            charName = new TextField();
            charName.defaultTextFormat = nameFormat;
            charName.text = value.charname;
            charName.x = 92.5;
            charName.y = 6.5;
            charName.width = 205;
            charName.height = 21;
            thechars[value.charid].addChild(charName);

If I trace charName.text it traces correctly, but when the containing movieclip is displayed, it is always blank and none of my settings (borders, background color, etc..) show up. I'm placing several of these movieclips into another movieclip, which is then added to a scroller as such:

            scrollContent.addChild(thechars[newvalue.charid]);
            theScroller.source = scrollContent;

The strange thing is that I am using the exact same method to drop a button into each of the 'thechars' and it shows up and works fine. AND... if I hover my mouse over the spot where the textField should be, I can see my mouse change from a pointer to a text cursor, so the textFields are showing up, they are just blank?

Help?

© Stack Overflow or respective owner

Related posts about flash

Related posts about as3