PDA

View Full Version : Inserting HTMLText Into Flash


APL_Designs
12-04-2008, 02:45 PM
Can someone point me to a post or give me some simple directions regarding the use of HTML text within flash.

Here's what I want to do:

A server script generates html formatted text (<p>,<strong>, etc) and places it in a specific <div>. I want to extract that text, which may include an <img> tag, but no other 'fancy' HTML, and put that into a text field in flash.

I know I can get the information I want by ExternalInterface.call and return the document.getElementByID().innerHTML.

I can get the HTML to show up in an alert box, but I can't seem to store it correctly, or insert it correctly so that it shows in Flash.

Any direction will be apprecitated.
Thanks.

Vjeko
12-05-2008, 09:29 AM
Are you showing it in a TextField? Are you using htmlText instead of text? Check your font if it supports html properties that you want (i.e. bold, italic etc.).

Hope that this helps.

Cheers,
Vjeko

APL_Designs
12-16-2008, 03:06 PM
I am indeed using htmlText, and I am using a TextField. It seems my problem is how I'm "storing" or assigning the information to the variable. It is always "undefined" or "null" as if I'm not passing the information correctly into Flash.

For example, I can assign htmlText to the my text field like this:

myTextField.htmlText = "<b>My bold text</b>" + myExt_htmlText;

and it shows in my TextField as "My Bold text undefined"

If that puts up a red flag to anyone, I would appreciate your comments. Thanks.

wvxvw
12-16-2008, 07:42 PM
This only means that myExt_htmlText is not defined when you execute that line of code.