PDA

View Full Version : htmlText and image



ven
April 27th, 2007, 12:28 PM
I have a textfield with htmltext. In this i receive some text formatted with the basic tags which Flash supports. (basicly <b><i><a><p><img>)

Problem is that when i insert an image, the text continues to wrap at the right side of the image, and not under the image, like it does in all normal browsers. Since the text is also used in usual htmlenviroment, i need the html to look the same in both flash and browser.


Ive tried to use styles (flash.text.StyleSheet) but i havent figured anything that help :ponder:

fr-ode
April 27th, 2007, 12:45 PM
how about adding a <br> right after the image?

ven
April 27th, 2007, 01:01 PM
putting <br> right after doesnt help :-/

devonair
April 27th, 2007, 01:27 PM
This is an old old Flash issue - nothing new to CS3. It was bad enough for me to give up using img tags in html text, but when I did I had to add enough <br/>'s to make it work (i.e. one just isn't enough). You can probably find more elegant solutions searching through the Flash 8 section..

ven
April 27th, 2007, 01:36 PM
I knew there was loads of issues with this in Flash 7 and 8, so i never even bothered to try the <img> tag there. I had some hopes that this had been significantly changed with the AVM2, but like you say it doesnt look like it.

Since the output is xhtml strict, it shouldnt be a hughe issue to create my own little engine with e4x though. I hope ;)