# Html text and floating image

**URL:** <https://forum.kirupa.com/t/html-text-and-floating-image/324102>\
**Category:** Uncategorized\
**Created:** [August 2, 2011, 1:18pm UTC](https://forum.kirupa.com/t/html-text-and-floating-image/324102 "2011-08-02T13:18:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![regbolD](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@regbolD](https://forum.kirupa.com/u/regbolD)\
**Post date:** [August 2, 2011, 1:18pm UTC](https://forum.kirupa.com/t/html-text-and-floating-image/324102/1 "2011-08-02T13:18:10Z")

</div>

I would need to float an image (which will be the same height as one line of text) in a dynamic textield, and when the textfield is resized, the image should follow like its part of the text.

(red picture is the image)

![](http://img580.imageshack.us/img580/4034/testya.jpg)

Putting and img tag inside htmlText doesnt do anything.

The best I could think so far (using TextLineMetrics or similar) is to leave a space, (or these dots (…) so that text doesnt collapse), and calculate where the last word before these dots is exactly from the top left of the textfield and place a movieclip on this position.

![](http://img36.imageshack.us/img36/4717/73994392.jpg)

If anybody got any suggestion, doesnt mater how hack it is, let me know!
