all groups > flash actionscript > february 2007 >
You're in the

flash actionscript

group:

renderAsHTML not working



renderAsHTML not working miquael
2/10/2007 10:59:18 PM
flash actionscript: seems simple enough. why won't this work?

my_text.renderAsHTML = true;

then I have a dynamic text field named "my_text" with "[B]test[/B]" written
inside of it.

result is " [B]test[/B]", not a bolded "test".


Re: renderAsHTML not working sly one
2/10/2007 11:06:07 PM
like this

Re: renderAsHTML not working miquael
2/10/2007 11:14:08 PM
yes, i had already tried this. it does not work either, and has the same result.

Re: renderAsHTML not working LuigiL
2/10/2007 11:30:16 PM
my_text.html = true;
my_text.htmlText="[B]test[/B]";
Re: renderAsHTML not working miquael
2/10/2007 11:45:53 PM
good idea. i still get no results with this though.

i have the same dynamic text field called "my_text" (blank, and designated to
show red colored text on a white background). with the above code, i see
nothing.

i also tried prescribing a variable "htmlText" to the dynamic field with no
results either.

how do we do this?


Re: renderAsHTML not working LuigiL
2/11/2007 11:41:09 AM
Try this code in a new fla file:
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
my_txt.html = true;
my_txt.htmlText = "[B] this is bold text [/B]";

If that doesn't work, check your publish settings. htmlText is available for
AS1 and with FP6 or above.

If you use a dynamic text field on the stage, the instance name of the text
field - which you set in the property inspector - must be 'my_txt', NOT the var
option.
AddThis Social Bookmark Button