Skip to main content
October 17, 2006
Question

insert image in textarea or text field

  • October 17, 2006
  • 1 reply
  • 835 views
while i try to insert an image in text area or text field using html code.
textArea.html = true;
textArea.text = "some text<img src='smile.jpg'>";
or
textField.htmlText= "some text<img src='smile.jpg'>";

the result i got was:
some text
grin;

izit possible to make it this way:
some text
This topic has been closed for replies.

1 reply

Participating Frequently
October 17, 2006
Yes but you need to make sure the the file "smile.jpg" is in the same directory as you published SWF or it won't work.

Also, you should use the syntax:

textfield.htmlText = "some text <img src='smile.jpg'>";

Tim
October 19, 2006
yes. the image is in the same folder as the swf..
when i use textarea.text = "Hello<img src='smile.jpg'> how are u"

it shows:
Hello how are u


with the image below the text.
miquael
Inspiring
January 5, 2007
if i may add to this problem ... for my situation includes this.

how can we include an image inline within the HTML text of a TextArea component -- and also have that image link to an AS function?

i want to have icons within the text of my TextArea that open pop-up windows within the Flash application (MC linkage).

is this possible?

thanks.