360 panorama from ftp doesn't work

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
JAMMINBILL
Posts: 3
Joined: Tue May 04, 2010 9:06 pm

'm loading a panorama into a Flash interactive. It comes up with a movieclip in response to a button event. It works great when I test it from my desktop with all the files in the same folder, but when I put the panorama.swf into our ftp server and try to link to it from the published interactive, all I get is the preloader (which appears to load the panorama) and the little skin buttons. There is no image at all. Here's the code I'm using (which, again, works perfectly from my desktop test.)

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 panorama in our ftp server.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
Post Reply