flash actionscript:
Be sure that when you published the project the player settings is 7 and as. 2.0 if it is mx 2004 [quoted text, click to view] "bderber" <webforumsuser@macromedia.com> wrote in message news:cq2cau$ddp$1@forums.macromedia.com... >I have a dynamic text box that when the text is updated, it does not >appear on > the screen but the updated text is identified in the debug screen as the > value > of the text property for the box. The text box is created with: > fld_Title3_text = _root.mc_holder.createTextField('fld_title_Text3', -13, > 36, > 72, 640, 48); fld_Title3_text.type = 'dynamic'; fld_Title3_text.selectable > = false; fld_Title3_text.border = true; fld_Title3_text.background = > false; > fld_Title3_text.wordWrap = true; fld_Title3_text.autoSize = true; > fld_Title3_text.multiline = true; fld_Title3_text.embedFonts = true; > fld_Title3_text.text = _root.var_Title3_text; backfield_fmt.font = > Account_txt.Secondary_Font; backfield_fmt.color = > Number(Account_txt.Secondary_Text_Color); > fld_Title3_text.setTextFormat(backfield_fmt); It is updated later in the > program with: _root.mc_holder.fld_title_Text3.text = > Language_txt.ChooseCardsText1; Any ideas why it won't show? bob >
I have a dynamic text box that when the text is updated, it does not appear on the screen but the updated text is identified in the debug screen as the value of the text property for the box. The text box is created with: fld_Title3_text = _root.mc_holder.createTextField('fld_title_Text3', -13, 36, 72, 640, 48); fld_Title3_text.type = 'dynamic'; fld_Title3_text.selectable = false; fld_Title3_text.border = true; fld_Title3_text.background = false; fld_Title3_text.wordWrap = true; fld_Title3_text.autoSize = true; fld_Title3_text.multiline = true; fld_Title3_text.embedFonts = true; fld_Title3_text.text = _root.var_Title3_text; backfield_fmt.font = Account_txt.Secondary_Font; backfield_fmt.color = Number(Account_txt.Secondary_Text_Color); fld_Title3_text.setTextFormat(backfield_fmt); It is updated later in the program with: _root.mc_holder.fld_title_Text3.text = Language_txt.ChooseCardsText1; Any ideas why it won't show? bob
It could be a couple things, try these: instantiate the text format, e.g.: var backfield_fmt:TextFormat = new TextFormat(); it could be the font property, depending on what is contained in Account_txt.Secondary_Font, it should be a string that matches the Linkage ID of the font that you should have added to your library. it could also be the color, depending on what is contained in Account_txt.Secondary_Text_Color, it should be a number if the form of 0xFFFFFF for example (which is equal = #FFFFFF / white). hope that helps
if text never appears, you're probably not linking a font. if text appears initially, but not when text is changed later, you probably haven't defined the setNewTextFormat() property of your textfield.
thanks kglas and friends - that was the problem - need to use setNewTextFormat() or any update occurs without adopting the existing format - once I did this all was well. Again thanks.
Don't see what you're looking for? Try a search.
|