PDA

View Full Version : XML problems with EmbedPano


testure
09-09-2007, 06:16 AM
I cannot get the hotspots to load from the XML-file.
The XLM works fine without the embed.fla
----------------------------------------------------------------



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

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

function loadComplete (e:Event) {
swapChildren(loader, border);
panorama = loader.content;
panorama.setArea(0,0,761,532);
panorama.loadPanorama("pano.swf?panoName=images/snow");

stage.addEventListener(MouseEvent.MOUSE_UP, reset);


pano1_btn.addEventListener(MouseEvent.CLICK, doPano1);
pano2_btn.addEventListener(MouseEvent.CLICK, doPano2);
}

function reset (e:Event) {
panorama.pano.panKey = 0;
panorama.pano.tiltKey = 0;
}


function doPano1 (e:Event) {
if (panorama.pano.loadCompleted) {
panorama.pano.remove();
panorama.loadPanorama("pano.swf?panoName=images/business2&xml_file=business2");
}
}


function doPano2 (e:Event) {
if (panorama.pano.loadCompleted) {
panorama.pano.remove();
panorama.loadPanorama("pano.swf?panoName=images/business2");


}
}

cheathamlane
09-09-2007, 05:28 PM
Hey testure --

Do you have a link to an example online?

testure
09-09-2007, 07:02 PM
I got it to work ;-)

THanks anyway.

cheathamlane
09-09-2007, 07:35 PM
Hey there:

http://testure.eu/examples/embed/embed.html

I was able to load both panos without any problem...

...I see, the arrows at left disappear; they show up for me for a brief second, then go away.

This looks like it might be a layering issue with your embed.swf... Maybe the pano you're loading in is just hiding or replacing the arrows?

cheathamlane
09-09-2007, 08:28 PM
I got it to work ;-)

THanks anyway.

Cool --

What was the issue?

testure
09-09-2007, 09:04 PM
Donґt really know. Now itґs working everything except that the hotspot stays the same all the time and do not change with the new xml.

testure
09-10-2007, 07:13 PM
And after a day of desperate thinking, I solved it using "linked" in the XML-files.:p