PDA

View Full Version : refreshing XML file in loadPano


irie7even
08-09-2007, 11:23 AM
hello everyone!

I need to embed the panorama into flash. up to that point everything works fine. I import the pano-file into the flash-file with the following code:

var panorama:MovieClip;
var loader:Loader = new Loader();
loader.load(new URLRequest("MYPANO.swf"));
addChild(loader);

loader.contentLoaderInfo.addEventListener(Event.CO MPLETE, loadComplete);

function loadComplete (e:Event) {

panorama = this.loader['content'];
panorama.setArea(14,45,550,240);
panorama.loadPanorama("pano.swf?panoName=MYPANO&xml_file=MYPANO.xml");


}

the spot in the xml-file (MYPANO.xml) is defined like that:

<spot id="2" url="button.png" pan="235" tilt="0" onClick="loadPano(MYPANO2.swf?xml_file=MYPANO2.xml&)" />


NOW THE PROBLEM: by clicking on a hotspot the other panos load quite well, but the xml-file remain the same.
What do I have to write into my xml-file (loadPano) to load the new pano AND the new xml file?

best regards

testure
09-09-2007, 09:25 PM
I used "linked" on my hotspots and that did the trick.