A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: <IMG> Loaded?

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    3

    <IMG> Loaded?

    Hello,

    Suppose I were to load an external image into a dynamic text box using an html image tag. (eg. textB.htmlText = "<img src='Images/Image1.jpg' id='myImage'>"; ) I then want a way to find out when the image specified in the <img> tag is completely loaded. This is so that I can stop flash from uncovering the dynamic text before all the images are completely loaded.

    I tried using getImageReference() (eg. textB.getImageReference("myImage").loaderInfo.addE ventListener(ProgressEvent.COMPLETE, completeFunc); ) but this didn't work.

    Is there a way to tell when all <img> tag images in a dynamic text box have been fully loaded from an external source?

    Thanks for your help!
    Last edited by Septenary; 09-07-2007 at 08:03 PM.

  2. #2
    Multitouch Aficionado
    Join Date
    Mar 2006
    Posts
    275
    I didn't even know you could load images in a textbox. . .

    I just use Loader, myself.

  3. #3
    Junior Member
    Join Date
    Sep 2007
    Posts
    3
    Found this out myself - I got a loaderInfo object from the contentLoaderInfo property of the loader object that textB.getImageReference("myImage") returned. I then added a listener for Event.COMPLETE to this loaderInfo object, which worked well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center