ActionScript 2, htmlText, img-tag and center-tag

Go To StackoverFlow.com

0

I'm trying to out an image into a Flash ActionScript 2 dynamic text box. This does work by putting <img ... /> into htmlText-code. But I cannot center the image on a line with the <center>...</center> tags.

Can anyone help me out on how to accomplish the following:

TEXT TEXT TEXT TEXT TEXT

          IMG

TEXT TEXT TEXT TEXT TEXT

in a htmlText-field in ActionScript 2.

2012-04-04 06:29
by user809829
have you apply width for image in css or can you share your cod - Ghost Answer 2012-04-04 06:49
I have not applied any width yet on images. Currently I have the following HTML code:

Lipsum

Lipsu - user809829 2012-04-04 08:40

Ghost Answer -> Does it help, if I put width on my images - user809829 2012-04-12 06:03
Can anyone give me a example of html-code, which should center and image in a htmlText-field in AS2 - user809829 2012-04-16 09:17
can you share your cod - Ghost Answer 2012-04-16 09:20
Yes, of course. My html code looks like this:

Lipsum

Lipsum

user809829 2012-04-18 06:10
try this code. I hope this will help you. if not then reply.

Lipsum

Lipsum

Ghost Answer 2012-04-18 07:13
Ghost Answer: It doesn't help. As you can see on my homepage: http://test.leifsigersen.com/#/blog the image is not centered. My code is placed in http://test.leifsigersen.com/xml/blog.php. In AS2 I retrieve the content from the XML-document's item "text" - user809829 2012-04-19 15:54
ok I will chec - Ghost Answer 2012-04-20 05:44
I've tried to make the images as wide as the text area, see example: test.leifsigersen.com/#/blog However, there's still some problems with some text in the right side. HELP - user809829 2012-06-19 08:30


0

Try this code with div that id wrapper

<?xml version="1.0" encoding="utf-8"?>
<about title="Blog">
<title>
    <![CDATA[]]>
</title>
<thumb></thumb>
<text>
<div id="wrapper" style="width: 500px;">
<p>04/19-2012 - Test with images...</p>
<p>This image is not centered, as it should be...</p>
<p>
    <center>
        <img src="/uploads/dmbtest.gif" alt="" width="210" height="100" />
    </center>
</p>
<p>This is text after the image, which should be placed just below the image and not next to it :(</p>
<p>##################################################</p>
</div>
</text><optionalText><![CDATA[]]></optionalText></about>

Its working fine

2012-04-20 09:28
by Ghost Answer
It does need to have CDATA around the content of the text-tag. I've changed the XML on the homepage, as you can see here: http://test.leifsigersen.com/xml/blog_test.xml. However, it still fails to center the image: http://test.leifsigersen.com/#/blo - user809829 2012-04-21 13:36
Ghost Answer -> do you have any idea of why it doesn't work? Do you have a .fla/.swf file where it does work - user809829 2012-04-25 16:07
Do you have an example where it works? Then I can match your example with mine - user809829 2012-05-15 06:11
I've tried to make the images as wide as the text area, see example: test.leifsigersen.com/#/blog However, there's still some problems with some text in the right side. HELP - user809829 2012-06-07 16:19
Ads