ThemeForest

Need help with images in htmlText

4265 posts
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Interviewed on the Envato Notes blog
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Exclusive Author
  • Beta Tester
  • Sold between 1 000 and 5 000 dollars
  • Bought between 10 and 49 items
  • United Kingdom
  • Referred between 1 and 9 users
Reaper-Media says

Hi guys, i’m having a lot of trouble getting images to display correctly in htmlText boxes in flash.

Yes… it’s AS2 , and its flash 8… but i don’t have any other option with it…

Anyway, very basic code here:

myText.html = true;
myText.htmlText = "some html text";

now all i want is to be able to display emoticons in-line with the text. i have a small search and replace going on for things like: ”:)” replacing them with image tags, but flash is just not having any of it.

No matter what i try, the images just seem to want to be below the text, or not appear at all. It’s extreamily frustraiting, nothing is working at all, these are some of the things i have tried and failed with:

<img src="image.png" vspace="0" height="16" hspace="0" width="16" />

<img src="image.png" vspace="0" hspace="0" />

<img src="image.png" height="16" width="16" />

<img src="image.png" />

<p> text before<img src="image.png" vspace="0" height="16" hspace="0" width="16" /> text after </p>

<imagebox><img src="image.png" vspace="0" height="16" hspace="0" width="16" /></imagebox>

all with prettymuch the same result, any help here would be much appreciated :)

Posted 2 years ago Permalink
Reaper-Media is an Envato staff member
6322 posts
  • Has been a member for 3-4 years
  • Won a Competition
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Exclusive Author
  • Beta Tester
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • United Kingdom
  • Referred between 10 and 49 users
MSFX says
Yes… it’s AS2 , and its flash 8… but i don’t have any other option with it…

sure you do coughas3splutter :)

I remember having issues with this but I think it was AS3 not AS2

Posted 2 years ago Permalink
MSFX is an Envato staff member
2965 posts
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Community Superstar
  • Interviewed on the Envato Notes blog
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • Europe
  • Referred between 10 and 49 users
Enabled says

You need CSS for that I think. load a newStyleSheet. :P

Posted 2 years ago Permalink
Enabled is an Envato staff member
25 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 1 and 9 items
  • Romania
  • Referred between 1 and 9 users
bogdesigns says

You cannot do this directly.

This is the way flash renders the htmltext, the images are put on a new row. You can go around this by parsing the string and position the images manually. I have had a try at this but did not have the time to finish it…not very easy thing to do.

Bogdan

Posted 2 years ago Permalink
3850 posts
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Community Superstar
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 100 and 499 items
  • United States
  • Referred between 10 and 49 users
CodingJack says

I think bog is right. You can only position an image “left” and “right” with the image “align” attribute unfortunately.

Posted 2 years ago Permalink
4265 posts
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Interviewed on the Envato Notes blog
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Exclusive Author
  • Beta Tester
  • Sold between 1 000 and 5 000 dollars
  • Bought between 10 and 49 items
  • United Kingdom
  • Referred between 1 and 9 users
Reaper-Media says

darn…

ok, looks like the emotes will have to stay as the font for now. No biggie, if any of you guys come accross a foolproof workaround, i’ll be eternally grateful :)

Posted 2 years ago Permalink
Reaper-Media is an Envato staff member
2662 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Exclusive Author
  • Beta Tester
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Spain
  • Referred between 100 and 199 users
pezflash says

Hi. As far as i have tested images loaded from html tag into dynamic textfileds are NOT loaded in a new row, unless you set br after img tag.

It’s a bit old post, but maybe useful: http://play.ground.gr/?p=77
It contains a bug demo file that could be useful for you, not in the way author expected when he uploaded it :P

Anyway quite a lot bugs with html tags into textfields, no matter the AS version you use. It’s pretty annoying that in all updates of the plugin Adobe didn’t solve common and simple errors. Maybe they are so worried about copyright of their brand names! :P

Posted 2 years ago Permalink
3850 posts
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Community Superstar
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 100 and 499 items
  • United States
  • Referred between 10 and 49 users
CodingJack says
Anyway quite a lot bugs with html tags into textfields, no matter the AS version you use. It’s pretty annoying that in all updates of the plugin Adobe didn’t solve common and simple errors. Maybe they are so worried about copyright of their brand names! :P

They created a new text framework for CS4 :

http://labs.adobe.com/technologies/textlayout/

Inline images is in one of the slides

Posted 2 years ago Permalink
by
by
by
by
by