open a new panorama .swf with a button

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
Flashnoob
Posts: 5
Joined: Wed Nov 24, 2010 11:28 pm

Sorry but I'm sort of a noob at flash, but I've got these panorama swf files that I want to be able to switch between using a button onpress function.
I have made an "interface" for the panoramas on the stage and I got the first panorama playing as it's supposed to, but then when I press the button I have attached the next panorama swf file to, it doesn't open correctly.. I have used a script I found on the forum and applied the BTN.onPress script at the bottom..
Can anyone please help me on this matter?
Heres the script I've used, its AS2:

var vr:MovieClip = _root.createEmptyMovieClip("vr", 1);
vr._lockroot=true;
// move the upper left corner
vr._x=100;
vr._y=200;
var myLoader = new MovieClipLoader();
var myListener = new Object();
myListener.onLoadStart = function () {
// Set the dimensions and position of the pano
vr.window_width=1266;
vr.window_height=714;
vr.window_x=8;
vr.window_y=6;
};
myListener.onLoadInit = function () {
// your initalisation of the pano, add Hotspots,...
// You can also set the window size here but you need to use the API
vr.pano.setWindowSize(500,380);
};
myLoader.addListener(myListener);
myLoader.loadClip("PanoramaONE.swf", vr);

ekstBTN.onPress = function(){
loadMovie("PanoramaTWO.swf",0);
}
Post Reply