Pano loads fullscreen on second button press

Specific Q&A about the new Flash export
Posts: 4
Joined: Thu Jul 16, 2009 5:08 am

Pano loads fullscreen on second button press

Post by stevethomas » Fri Jul 17, 2009 3:24 am

I have a pano that loads into a mc in as3 and I have the mc visibilty set to false at the start. On a button event I make the mc visible = true and the pano is visible then also.

Problem is, if I click on the button again or navigate away and then back, the pano comes in full screen. Is there a line of code to place either in the button function or elsewhere that will fix this?

Here is the code that sets the initial size of the mc:

function initPanorama(e:Event) {
// check if the panorama object is available and initialize it
if ((vr!=null) && (vr.pano!=null)) {
removeEventListener( Event.ENTER_FRAME , initPanorama);
vr.pano.setWindowSize(425,240); // resize the window
vr.pano.setWindowPos(0,0); // reposition

Here is the code I have for the button (vrOne):

MouseEvent.MOUSE_UP, Pano1)
function Pano1 (evt:MouseEvent):void {
targetvr_mc.visible = true; //makes the container mc visible
swfLoader.load(loadRequestPano1); // loads the pano I want. I have other buttons that load other panos into the same mc



Who is online

Users browsing this forum: No registered users and 3 guests