Return to Snippet

Revision: 13584
at April 28, 2009 13:31 by antpaw


Updated Code
<!-- HTML -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<script type="text/javascript" src="swfobject.js"></script>
		<script type="text/javascript">
			var flashvars = {};
			var params = {};
			params.allowfullscreen = "true";
			var attributes = {};
			swfobject.embedSWF("untitled.swf", "myAlternativeContent", "800", "600", "9.0.0", false, flashvars, params, attributes);
		</script>
	</head>
	<body>
		<div id="myAlternativeContent">
			<a href="http://www.adobe.com/go/getflashplayer">
				<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
			</a>
		</div>
	</body>
</html>

//AC3:
import flash.display.StageDisplayState;

function goFullScreen():void{
    if (stage.displayState == StageDisplayState.NORMAL){
        stage.displayState=StageDisplayState.FULL_SCREEN;
    }
    else {
        stage.displayState=StageDisplayState.NORMAL;
    }
}

stage.addEventListener(MouseEvent.CLICK, _handleClick)

function _handleClick(event:MouseEvent):void{
    goFullScreen();
}

Revision: 13583
at April 28, 2009 13:30 by antpaw


Initial Code
<!-- HTML -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<script type="text/javascript" src="swfobject.js"></script>
		<script type="text/javascript">
			var flashvars = {};
			var params = {};
			params.allowfullscreen = "true";
			var attributes = {};
			swfobject.embedSWF("untitled.swf", "myAlternativeContent", "800", "600", "9.0.0", false, flashvars, params, attributes);
		</script>
	</head>
	<body>
		<div id="myAlternativeContent">
			<a href="http://www.adobe.com/go/getflashplayer">
				<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
			</a>
		</div>
	</body>
</html>

//AC3:
import flash.display.StageDisplayState;

function goFullScreen():void{
    if (stage.displayState == StageDisplayState.NORMAL){
        stage.displayState=StageDisplayState.FULL_SCREEN;
    }
	else {
        stage.displayState=StageDisplayState.NORMAL;
    }
}

stage.addEventListener(MouseEvent.CLICK, _handleClick)

function _handleClick(event:MouseEvent):void{
    goFullScreen();
}

Initial URL

                                

Initial Description

                                

Initial Title
Fullscreen with ActionScript 3

Initial Tags
html, xhtml, flash

Initial Language
ActionScript 3