Discussion:
Load external swf with scene and viewport
John Barcklay
2010-10-18 15:28:40 UTC
Permalink
Hi guys! I would like to know if it's possible to load a external swf
containing a Papervison3D scene and a viewport (without camera) to a main
swf containing himself a scene, a camera and a viewport.
In my project I want to load an external swf in the main swf an use the same
camera for the main and the external swf, just switch the viewport and the
scene. I would like to know how to do this please.

I use this to load my external swf in my main class:
private function switchScene():void
{
var ur:URLRequest = null;
var lc:LoaderContext = null;
currScene = filepath + "/" + navName[currentNumber] + ".swf";
ur = new URLRequest(currScene);
lc = new LoaderContext();
lc.applicationDomain = ApplicationDomain.currentDomain;
ldr = new Loader();
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, sceneLoaded);
ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
sceneProgressHandler);
ldr.load(ur, lc);
return;
}

I have a problem with this :
ldr.content.scene

and this :

ldr.content.viewport

Thanks

Loading...