In as2 i added getdate.time to the end of the xml url so it would always load the most recent version of that doc. What is the equivelent in as3?
My xml doc changes all the time and when that flash doc caches the xml it isnt loading the currect version.
Code
[AS]
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
var MyXmltxt:String = new String();
var startingxml:String = new String();
var started:Number = new Number();
started = 0;
myLoader.load(new URLRequest(“chat.xml”)); [COLOR=“black”]<<<–Need to add getdate.time here[/COLOR]
myLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void
{
trace(“in function”);
myXML = new XML(e.target.data);
MyXmltxt = myXML;
if (started == 0)
{
trace(“in first if”);
startingxml = myXML;
for (var i:int = 0; i<myXML..length(); i++)
{
Chat.text += myXML.IMAGE. @ Names + ": " + myXML.IMAGE*;
Chat.text += "
";
}//Chat.verticalScrollPosition=10
Chat.setSelection(0, Chat.length);//Chat.scrollH = Chat.maxScrollH;
}
if (started > 0)
{
if (startingxml == MyXmltxt)
{
}
else
{
trace(“in second if”);
startingxml = myXML;
Chat.text = “”;
for (i = 0; i<myXML..length(); i++)
{
Chat.text += myXML.IMAGE. @ Names + ": " + myXML.IMAGE*;
Chat.text += "
";
}//Chat.verticalScrollPosition+=10
//Chat.scrollH = Chat.maxScrollH;
Chat.setSelection(0, Chat.length);
}
}
started++;
}
[/AS]