When xml is changed the swf file doesn't change



I am trying to read values from XML to swf file ,so i have a xml file like this :



<?xml version="1.0" encoding="utf-8"?>
<GALLERY>


<IMAGE TITLE="ssasa">image1.jpg</IMAGE>
<IMAGE TITLE="oooo">image2.jpg</IMAGE>
<IMAGE TITLE="shop">image3.jpg</IMAGE>
</GALLERY>


In my AS3 flash file i have this code :



import flash.system.SecurityDomain;
import flash.system.Security;

var xml:XML;
var xmlList:XMLList;
var xmlLoader:URLLoader = new URLLoader();
Security.loadPolicyFile("http://localhost:15979/crossdomain.xml");
xmlLoader.load(new URLRequest("http://localhost:15979/default.aspx"));
xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
function xmlLoaded(event:Event):void
{
xml = XML(event.target.data);
xmlList = xml.children();
trace(xml.IMAGE[1].@TITLE);
txtname.text=xml.IMAGE[1].@TITLE;
}


In my timeline i have this :


enter image description here


As you can see i call my acionscript code in frame 22,but my problem is when i changed the data in xml file the swf file ,it doesn't apply to swf file and the swf file shows the old text on the screen ,but after closing the file it works fine and the new text appears.


No comments:

Post a Comment