Hey guys, I’m very new to AS3 -
I’ve made a text field with text content and custom scroll arrows, and the text field loads XML content. Now I’d like to add images in the text field box, but I’m not sure you can do that. My Google searches proved unfruitful.
Is there a good way of doing this?
Thanks!
hey pancake, if you make your text box an html text box and load in html rather than xml then you can embed images with the usual html tags… or does it have to be xml you’re loading in there? i did a site recently where my loaded content was just in a .txt file but was html formatted and it loaded really nicely into an html text field.
I have to use XML. I’ve tried using something like:
info_txt.htmlText += “<image src=etcetc>”;
which doesn’t work either.
ok i just tried it out and it’s kinda interesting. first off, your should replace
“<image src=etcetc>”
with
‘<image src=etcetc>’
as you’re already inside “”.
second, it seems still not to work unless you have something (anything, could even be a space) before the image - this code works for me:
info_txt.htmlText += " <img src=‘yourimage’>";
the aforementioned problem only occurs when using += and not with just = BTW.
Ah, all right - thanks! Works perfectly!
Out of curiosity, would you know of any way to add movie clips or graphics to the text field without using HTML?
glad you’re sorted! i’m afraid i don’t know how to do it without using html… maybe someone else on here can help?
