I have a 360 degree panorama in a movieclip that should load when a button event brings up the movieclip. It works from my desktop, but when I put the panorama in our ftp server and link to it from the published interactive I get the preloader and I get the little skin controls, but no panorama. Again it works great from my desktop when everything is in the same folder. Here’s the code I’m using to link it to the Flash file:
import flash.display.;
import flash.display.;
import flash.net.URLRequest;
import flash.events.Event;
var loader:Loader;
loader = new Loader();
var url:String = “address to the ftp and the panorama.swf”;
var urlReq:URLRequest = new URLRequest(url);
var vr:MovieClip; // panorama movieclip
// This is done after the swf is loaded.
function finished_loading (e:Event) {
}
function initPanorama(e:Event) {
// check if the panorama object is available and initialize it
if ((vr!=null) && (vr.pano!=null)) {
removeEventListener( Event.ENTER_FRAME , initPanorama);
vr.pano.setWindowSize(200,100); // resize the window
vr.pano.setWindowPos(200,200); // reposition
}
}
// call initPanorama every frame
addEventListener( Event.ENTER_FRAME , initPanorama);
// Tell the loader to call ‘finished_loading’ after the swf is loaded.
loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finished_loading);
// Tell the loader to call ‘initHandler’ after the swf is initialized.
//loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.load(urlReq);
addChild(loader); // add your swf directly to the stage
I’ve tried some different code, but the results have always been the same: It works on my desktop but not when the published interactive links to the panorama in the ftp server.