Sunday, February 10, 2008

FullScreen Class

Here's a class that lets you go fullscreen quite simple.

Create a MovieClip in your .fla with two frames ('on' and 'of 'mode') with


on the first frame. Remove it from the stage and in your library fill in 'FullScreenToggle' as the Class linkage.

Then instantiate this class from within your document class like this:

var fullscreen: FullScreen = new FullScreen(this.stage, 20, 400);
This works in the stand alone flash player or exe file. To make it work in the browsers too, change this in your html:

param name="allowFullScreen" value="true"
embed src="example.swf" allowFullScreen="true" ...
AC_FL_RunContent( ... "allowFullScreen", "true", ... )

My chopper demo is a working example.


1 comment: