# Preloading images in htmlText

**URL:** https://forum.kirupa.com/t/preloading-images-in-htmltext/290658
**Category:** Uncategorized
**Created:** [June 17, 2009, 7:42pm UTC](https://forum.kirupa.com/t/preloading-images-in-htmltext/290658 "2009-06-17T19:42:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Didi32](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@Didi32](https://forum.kirupa.com/u/Didi32)
#### Post date: [June 17, 2009, 7:42pm UTC](https://forum.kirupa.com/t/preloading-images-in-htmltext/290658/1 "2009-06-17T19:42:27Z")

</div>

Hi,

I have different htmlText strings for my TextField.  
Each of them contains an image with the text:  
textfield.htmlText = “\<img src=‘animage.jpg’\>Here is my text”;

textfield.htmlText = “\<img src=‘anotherimage.jpg’\>Here is my second text”;

Now what I’m doing is making a fadein effect on the TextField, from 0 to 1, and changing the htmlText. The problem is that, when the image is not loaded in the cache, it is displayed a little abruptly after maybe half a second, which really doesn’t look good.

How could I force Flash the preloading of these images before the fadein without having the user notice it?

Thanks for your help.
