Here I put an example that shows how to make a flash animation of the entire screen. In the actionscript code do the following:
irAFullScreen function (): void {
if (Stage.displayState == StageDisplayState.NORMAL) {
Stage.displayState = StageDisplayState.FULL_SCREEN;
} Else {
Stage.displayState = StageDisplayState.NORMAL;
}}
manejadorDeClick function (event: MouseEvent): void {
irAFullScreen ();}
btnIrAFullscreen.addEventListener (MouseEvent.CLICK, manejadorDeClick)
For this example I put this code in the first frame main scene.
use the object stage in the method irAFullScreen () . The first thing we do is check the current status of the screen with variable Stage.displayState if NORMAL do that is to be fullscreen, if not then do you go fullscreen normal size.
I've also created a button and have added a listener for the click invoking our irAFullScreen function () .
is necessary in the HTML code you include the following label:
name="allowFullScreen" value="true"> \u0026lt;param
The complete code I put below:
\u0026lt;object classid = "clsid: d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab # version = 9,0,0,0"
width = "200" height = "200"
id = "fullscreen" align = "middle">
\u0026lt;param name="allowscriptaccess" value="sameDomain" />
\u0026lt;param name = "allowFullScreen" value = "true" />
\u0026lt;param name = "movie" value = "fullscreen.swf" />
\u0026lt;param name="quality" value="high" />
\u0026lt;param name="bgcolor" value="#CCCCCC"
/> \u0026lt;embed src = " fullscreen.swf "quality =" high "bgcolor =" # CCCCCC "
width =" 200 "height =" 200 "name =" full screen "
align =" middle "allowScriptAccess =" sameDomain "allowFullScreen = "true"
type = "application / x-shockwave-flash" pluginspage = "http://www.macromedia.com/go/getflashplayer" />
\u0026lt;/ object>
can download the code complete example here:
0 comments:
Post a Comment