you might also try tacking on the random url var in the old fashioned
way:
 
new URLRequest(xmlPath+xmlFilename+langCode+".xml?timestamp="+{new
Date().getTime()});

 

Darin Kohles, Application Developer
[EMAIL PROTECTED]
Digital Positions, Inc.
2289 Peachtree Road NE
Atlanta, GA 30309

404-351-8878 support phone
404-351-2366 main phone
404-351-4055 fax
http://www.d-p.com/ 

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
Thompson
Sent: Wednesday, November 07, 2007 5:54 PM
To: discussion
Subject: [AFFUG Discuss] URLLoader caching in IE


I am loading in an XML doc in an AS3 project and running into errors
using IE where it caches the document. Because the site does not init
until after the URLLoader.COMPLETE event fires, the swf never properly
inits on the second load in IE.

I have tried adding a random number to the url request, but that
prevents the XML from loading.

Any ideas on preventing IE from caching my XML after first load?

Here's my code:

    // load the localized XML document
    var loader:URLLoader = new URLLoader();
    var xmlRequest:URLRequest = new
URLRequest(xmlPath+xmlFilename+langCode+".xml");
    
    // attemp to add a random variable
    var randomVar:URLVariables = new URLVariables();
    randomVar.unique = new Date().getTime();
    xmlRequest.data = randomVar;

    loader.addEventListener(IOErrorEvent.IO_ERROR,
function(evt:Event):void {trace('error loading xml');});
    loader.addEventListener( 
            Event.COMPLETE, 
            function(evt:Event):void { 
            langXML = XML(evt.target.data);
            setTollFreeCopy();
            footer_txt.htmlText = langXML.footerText;
            init();    
            } 
    );
    loader.load(xmlRequest); 
------------------------------------------------------------- 
To unsubscribe from this list, simply email the list with unsubscribe in
the subject line 

For more info, see http://www.affug.com 
Archive @ http://www.mail-archive.com/discussion%40affug.com/ 
List hosted by FusionLink <http://www.fusionlink.com>  
------------------------------------------------------------- 



-------------------------------------------------------------

To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line



For more info, see http://www.affug.com

Archive @ http://www.mail-archive.com/discussion%40affug.com/

List hosted by http://www.fusionlink.com

-------------------------------------------------------------

Reply via email to