Skip to main content
Participating Frequently
February 1, 2011
Question

Air not support <img> tag on textField?

I try this:

text_txt.htmlText = "<IMG src='myimage.jpg' id='image' /><P>This is my picture</P>";

text_txt.text = text_txt.htmlText ;

on Flash player

out put is : <IMG src='myimage.jpg' id='image' /><P>This is my picture</P>;

but on Air

out put is : <P>This is my picture</P>;

What's happened?

Can you help me?

and Sorry about my english.

Ce sujet a été fermé aux réponses.

2 commentaires

tonsmart5Auteur
Participating Frequently
February 2, 2011

Thank you Chris , I'm so glad.

       Oh, I've missed the important  issue for air, thank full for remind me Chris

chris.campbell
Legend
February 1, 2011

Hello,

Any possibility you could use the HTML control instead?  The textField control does not support the <img> tag in AIR due to security issues.  Here's the comment from the documentation:

For AIR content in the application security sandbox, AIR ignores img tags in HTML content in ActionScript TextField objects. This is to prevent possible phishing attacks.

Thanks,

Chris