Page 1 of 1

placing pano into flash window

Posted: Tue Jun 17, 2008 1:59 pm
by pdmultimedia
I'm having trouble placing a pano into a flash project. I can get the pano.swf loaded into the project using the loader component but, no matter where I place the loader component the pano.swf always loads at the x=0 and y=0 coordinate. I can't seem to get it to load anywhere else other than the upper left. Any suggestions?

Thanks

Re: placing pano into flash window

Posted: Tue Jun 17, 2008 7:03 pm
by thomas
Please have a look at the Flash API page where you can finde the calls for changing the position.

Re: placing pano into flash window

Posted: Wed Jul 16, 2008 8:43 pm
by zorro
We solved this same issue but our problem is getting the controllers to be inside the panorama swf window. They load centered on the main flash window that houses our panorma movie not on the panorama movie which is what we want. Any ideas?

Re: placing pano into flash window

Posted: Sun Jul 20, 2008 12:18 pm
by hum@no.id
Maybe need save main panorama SWF to v8

Re: placing pano into flash window

Posted: Tue May 26, 2009 7:42 pm
by bigbstanley
I am having the exact same problem. I'm using all AS3 and when I load the pano into a movie clip that I have on stage, the cursor gets confused and uses the root as it's x and y, not the movieclip that the pano is loaded into. I found that it was because I was placing my "parent" clip on the stage where I wanted the pano to sit. Instead, I put the "parent" at 0,0 and then use the api to change where to place the pano. Like this:

var loader:Loader;
loader = new Loader();
var url:String = "panorama.swf";
var urlReq:URLRequest = new URLRequest(url);
var vr:MovieClip;

function finished_loading (e:Event) {
vrx_mc.addChild(loader.content); //positioned at 0,0
}
function initHandler(event:Event):void {
vr = MovieClip(loader.content);
vr.pano.x = 168;
vr.pano.y = 52;
}
loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finished_loading);
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.load(urlReq);

Re: placing pano into flash window

Posted: Wed Jul 15, 2009 3:01 am
by punkito
I used your code but I have a doubt, what does vrx_mc on line 8 stands for?

In my compiler errors it says "1120: Access of undefined property vrx_mc"

Another question:HOW TO MOVE THE BUTTON BAR? the bar with arrows to move inside the panorama, it is pretty useful but it appears whereever it wants..., but how can we reach it through Flash AS? I think it would be something like "vr.pano.skin", "vr.pano.buttonbar" or something like that...

Re: placing pano into flash window

Posted: Wed Jul 15, 2009 3:14 am
by punkito
I have just solved the problem, the only thing we need to add to move the entire swf to the position we want to, using the code provided by bigbstanley is:

vr.x =150;
vr.y =150;


I used this code inside "initHandler" function, in the "finished_loading" function and also in the "init_Panorama" function and work very well.

This is the way to move the entire movieclip (called vr in the API example and the modified code of bigbstanley) and not only the panorama picture (that means the panorama, buttons, images, hotspots, and everything added in the skin editor inside Pano2VR). It may work also with the Flash API page provided by our friends of GardenGnomeSoftware...