When I attempt Fullscreen in AS3 site, it only affects one of the nested swfs

FargoGreen used Ask the Experts™
I have a complex website, that has a root file (preloader) that then loads a main swf, which in turn loads and add many other swfs & FLVs.  I'm trying to get the entire site to go fullscreen and scale all included swfs.  

When I use the code below in the preloader swf (root) it works but only stretches the most recently added swf.  The affected swf changes as I test it with different swfs visible.  Fullscreen's always been elusive for me, so any help would be greatly appreciate.

Thanks you in advance...
public function toggleFullScreen(event:MouseEvent):void {
            trace('super-size me!!!');
			switch(stage.displayState) {
                case "normal":
                    stage.displayState = "fullScreen";    
                case "fullScreen":
                    stage.displayState = "normal";    

Open in new window

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

I've made many fullscreen flash websites. I've never written fullscreen actionscript inside flash. What i needed to do for fullscreen was in the html page. You need to set the width and height to 100% and the flash will automatically make everything fullscreen.

this is only if your loaded movie clips need to be enlarged to their respective sizes.


Hi vipul, thanks for the response!

It sounds like the method you're talking about would make it full-browser, but not fullscreen. (Like if you click fullscreen at the bottom of http://asylum626.com/closed/)  Unless I'm mistaken about what you mean.  

Any thoughts would be greatly appreciated!
oh right i misunderstood. i meant fullscreen in browser....

see if this helps in any ways


Good to note that in the linked page's code snippet, they listed

  Stage.displayState  = "fullScreen"

but the s in stage must be lowercase to address the proper object.  Stage is also an object but not the needed one.  So it should be

  stage.displayState  = "fullScreen"

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial