Skip to main content
Inspiring
March 11, 2010
Question

image not displaying with HTML text field

  • March 11, 2010
  • 4 replies
  • 1416 views

I am trying to display am image within

flash using CS3.

I have a text field with the following code.

feedback.htmlText = "<img src='Logo_small.png'</img>"

nothing displays. The image and flash document are at the same level, so that is why I am using a relative link. Do I need to use a full (absolute) link to the image?

This topic has been closed for replies.

4 replies

Participating Frequently
March 14, 2010

Hi,

I have tried to solve this issue. Hopefully this code will help you.

myTextBox.htmlText = "<img src='picture.jpg' width='200' height='200' />what can be rendered You should see an eye image and some <u>HTML</u> text.";

myTextBox.multiline = true;

myTextBox.wordWrap = true;

NOTE: put image and fla/swf file in the fame folder. this code is working fine.

Thanks

-Actionscript Developer

Inspiring
March 12, 2010

thanks for the responses, I can get the image to display now.

Inspiring
March 11, 2010

You must set multiline and wordWrap to true in order for image to disaplay without additional text:

feedback.multiline = true;

feedback.wordWrap = true;

Ned Murphy
Legend
March 11, 2010

That's not properly coded html...

feedback.htmlText = "<img src='Logo_small.png' />";

image tags do not have a closing tag and you didn't close the opening tag if they did, so it would still fail.

Inspiring
March 11, 2010

thanks, I made the change though and the image still doesn't display for me.

Ned Murphy
Legend
March 11, 2010

What happens if you just put text instead of the image tag?