A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: loadComplete Event + src images in anchors

  1. #1
    Junior Member
    Join Date
    Jan 2009

    loadComplete Event + src images in anchors


    Suppose one does:

    var myLoader:URLLoader = new URLLoader();
    myLoader.load(new URLRequest(xmlPath));

    myLoader.addEventListener(Event.COMPLETE, processXML);

    function processXML(e:Event):void {
    bla.htmlText = bla....

    here xmlPath is the path to an RSS feed. I parse the xml and what not but then i define a dynamic text box in processXML which uses the parsed data. for example:

    bla.htmlText = "<p><a href="http://www.fandango.com/drive+angry+3d_131568/movieoverview?wssac=123&wssaffid=11840"><img src="http://images.fandango.com/r84.9.1/ImageRenderer/69/103/images/no_image_69x103.jpg/131568/images/masterrepository/tms/94283/94283_aa.jpg" alt="Drive Angry 3D" title="Drive Angry 3D" border="0" /></a> Opens Friday, Feb 25, 2011</p><p><a href="http://www.fandango.com/drive+angry+3d_131568/summary?wssac=123&wssaffid=11840">Movie Details</a> <a href="http://www.fandango.com/drive+angry+3dmovietrailer/v498833?wssac=123&wssaffid=11840">Play Trailers</a></p><p><a href="http://www.fandango.com/drive+angry+3d_131568/movietimes?wssac=123&wssaffid=11840"><img src="http://images.fandango.com/r84.9.1//images/global/buy_tickets.gif" alt="Buy Tickets" title="Click here to see showtimes and buy tickets!" border="0" /></a></p>"

    This is fine except that because the loader event fires after loading the xml file the text is showing up "before" the src images inside this html actually are loaded...

    Is there an way to prevent this? There must be something I can grab since flash has to be loading these images right?

  2. #2
    Junior Member
    Join Date
    Jan 2009


    It appears that this would be possible using the :

    getImageReference attribute of the text box if my src tags had the id attribute associated with them:


    Then I could construct event listeners on the movie clips flash used to load these images. However here the id attribute is not provided??? is there a workaround????

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