Add script (as3) to fullscreen button

Using Pano2VR/Object2VR SWF files with your own Flash projects
Post Reply
Posts: 4
Joined: Thu Jul 16, 2009 5:08 am

Thu Aug 20, 2009 11:07 pm

Is there a way to add some actionscript to the fullscreen button with AS3 either before converting the pano to a swf or controlling the fullscreen button outside the swf?

What I'd like to do is when you press on the fullscreen button it will hide something on the flash stage that I need to be infront of it before it goes fullscreen.

btn_instance_name.visible = false;

User avatar
Chief Gnome
Posts: 2566
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria

Fri Aug 21, 2009 1:59 pm

Not directly but you can connect to the RESIZE Stage event and react accordingly.

Something like:

Code: Select all

import flash.display.StageDisplayState;

stage.addEventListener(Event.RESIZE, handleStageResize);

function handleStageResize(e:Event):void {
  if (stage.displayState == StageDisplayState.FULL_SCREEN) {
    //Do your full screen stuff
  }else {
    //Do your back to normal screen stuff
MfG, Thomas
Posts: 4
Joined: Thu Jul 16, 2009 5:08 am

Sat Aug 22, 2009 12:10 am

Thanks! It works like a charm. Exactly what I was looking for.
Posts: 1
Joined: Sat Jan 23, 2010 6:39 am

Sat Jan 23, 2010 10:32 am

How is it possible to get a flash output and at the same time when its open is on full screen position.
Post Reply