# HTML with image and Flash

**URL:** <https://forum.kirupa.com/t/html-with-image-and-flash/266596>\
**Category:** flash\
**Created:** [July 22, 2008, 3:35pm UTC](https://forum.kirupa.com/t/html-with-image-and-flash/266596 "2008-07-22T15:35:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CayoHueso](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@CayoHueso](https://forum.kirupa.com/u/CayoHueso)\
**Post date:** [July 22, 2008, 3:35pm UTC](https://forum.kirupa.com/t/html-with-image-and-flash/266596/1 "2008-07-22T15:35:12Z")

</div>

Hi, I have a Flash file with the following code in it:

```auto

// Create a new style sheet object and set styles for it.
var styles:TextField.StyleSheet = new TextField.StyleSheet ();
styles.setStyle ("html",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'12px', color:'#0000FF'});
styles.setStyle ("body",{color:'#00CCFF'});
styles.setStyle ("h1",{fontFamily:'Arial,Helvetica,sans-serif', fontSize:'24px', color:'#006600'});
styles.setStyle ("p",{color:'#000000', fontSize:'14px'});
styles.setStyle ("a",{color:'#0000FF', fontSize:'14px', fontWeight:'bold', textDecoration:'underline'});
//
/* Assign the style sheet object to myTextArea component. Set html property to true, set styleSheet property to the style sheet object. */
myTextArea.styleSheet = styles;
myTextArea.html = true;
myTextArea.focusTextField = null;
//

var myVars:LoadVars = new LoadVars ();
// Define onData handler and load text to be displayed.
myVars.onData = function (myStr:String):Void {
	if (myStr != undefined) {
		myTextArea.text = myStr;
	} else {
		trace ("Unable to load text file.");
	}
};
//
myVars.load ("references.htm");
//

```

Then, I have the file references.htm to be loaded:

```auto

<p>Text text text. <br/>[<img src='images/imagepopup.gif' width='15' height='15' vspace='0' hspace='0'/><a href="http://www.cnn.com" target="_blank">Link to CNN</a>]</p>

```

The problem is that the image that is in the HTML code does not appear in the same line with the text (inside the []). Instead, it appears in a line below.

It looks like this:  
Text text text.  
[Link]  
Image

But it should look like this:  
Text text text.  
[Image Link]

Is there anything wrong with the code? Please advice.  
Thanks,  
CH
