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
placing pano into flash window
Please have a look at the Flash API page where you can finde the calls for changing the position.
MfG, Thomas
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
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
-
- 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);
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);
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...
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...
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...
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...