PDA

View Full Version : Reload Pano


irie7even
08-10-2007, 02:00 PM
hello again!

THE FIRST TIME when I load a flash-panorama into my swf-file everything works fine an smooth. but when I load the file again, the panorama is bucking and the control is anything but smooth.

this is the code in my swf-file:

var mySWFFile:String="MY.swf";
var myPanoSWFFile:String="pano.swf?panoName=MY&xml_file=MY.xml";

var panorama1:MovieClip;
var loader1:Loader = new Loader();
loader1.load(new URLRequest(mySWFFile));

addChild(loader1);

loader1.contentLoaderInfo.addEventListener(Event.C OMPLETE, loadComplete1);


function loadComplete1 (e:Event) {

panorama1 = this.loader1['content'];
panorama1.setArea(14,45,550,240);
panorama1.loadPanorama(myPanoSWFFile);

}


I think that I have to unload or remove the loaded panorama but I don't know how to do it. I hope you can help me out of my mess.

kind regards

Markavian
08-12-2007, 08:44 PM
I have been using this command when switching between panoramas:

panorama.pano.remove();

or

try
{
p_panorama.pano.remove();
}
catch(err:Error)
{
trace("Display Panorama : "+err);
}


But I'm not sure this gets rid of plugins loaded into different layers.

irie7even
08-13-2007, 06:12 AM
thanks a lot, now it works great.

do you also know how to reload xml files? I posted a thread about refreshing xml but i didn't get an answer yet.

thanks for your help.

birdseye
08-13-2007, 07:38 AM
This looks interesting...

Maybe this sounds stupid, but my knowledge about Javascript is very limited...

Can I see an example of the complete html file where this code is embedded ?

Tnx in advance,

Yvan.