View Full Version : setChildIndex of text field -- text disappearing?
pixielex
02-28-2008, 02:50 PM
I'm setting the child index of a dynamic text field so that it always sits on top of whatever else gets placed on the stage using the following code:
setChildIndex(fpsText, fpsText.parent.numChildren-1);
I've tried a number of variations, including this.numChildren-1, this.parent.numChildren-1, etc. Basically, if I get the text field to sit on top of everything like I want it to, then I only see the background color of the text field, but the text itself disappears. Does anyone know why this is happening and how to fix it?
Flassari
02-28-2008, 04:19 PM
fpsText.parent.setChildIndex(fpsText, fpsText.parent.numChildren-1);
pixielex
02-28-2008, 04:35 PM
Nope, the text is still disappearing. Any other suggestions?
Flassari
02-28-2008, 04:50 PM
hmmm.. you've stumped me...
You say that you can see the background of the textfield but not the text? That's very weird...
pixielex
02-28-2008, 04:53 PM
YEah, right? The only thing I can think of is that the text part of the text field is somehow not getting pushed up to the top layer...I have no idea.
Flassari
02-28-2008, 04:56 PM
Does it still happen if you try embedding the font? That might be the problem, when fonts are not embedded the textField get's extremely limited functionality, and does not support lots of things like filters and masking.
If your textField is created using actionscript, try embedding the font in your library, use embedFonts = true on the textField and set the defaultTextFormat of the textField to a new textformat using the embedded font's name.
pixielex
02-28-2008, 04:56 PM
OK, I took off the bg completely, and now the text appears and stays on top just fine, EXCEPT that every time I write to the text field, it appears to write on top of the previous text -- i.., the previous text stays in the text field, but the new text appears literally on top of it, making it unreadable. WTF?????
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.