Create a MovieClip in your .fla with two frames ('on' and 'of 'mode') with
stop();
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.
Source: FullScreen.as
test restored blog comment
ReplyDelete