placing pano into flash window

Specific Q&A about the new Flash export
Locked
pdmultimedia
Posts: 1
Joined: Mon Jun 16, 2008 11:52 pm

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
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

Please have a look at the Flash API page where you can finde the calls for changing the position.
MfG, Thomas
zorro
Posts: 9
Joined: Wed Jul 16, 2008 7:56 pm

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?
User avatar
hum@no.id
Posts: 945
Joined: Sat Sep 09, 2006 10:35 pm
Location: Dark side of the Moon
Contact:

Maybe need save main panorama SWF to v8
Gumir J | VR Panoramic Photographer | mobile: +77055717171 | skype: gumirj
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
bigbstanley
Posts: 5
Joined: Tue May 26, 2009 7:27 pm

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);
punkito
Posts: 9
Joined: Fri Mar 20, 2009 7:12 am

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...
punkito
Posts: 9
Joined: Fri Mar 20, 2009 7:12 am

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...
Locked