I'm having trouble, I want my animation to be able to go full screen, but it doesn't seem to be working. I don't know if the problem is in the actionscript or html. Thanks for any help
FullScreenBut.addEventListener(MouseEvent.CLICK, goFullScreen);
function goFullScreen(event:MouseEvent):void
{
setFullScreen();
}
function setFullScreen():void
{
if (stage.displayState== "normal")
{
stage.displayState="fullScreen";
stage.scaleMode = StageScaleMode.NO_SCALE;
}
else
{
stage.displayState="normal";
}
}
///////HTML/////////
<body>
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="200">
<param name="movie" value="animation.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="15.0.0.0" />
<param name="allowFullScreen" value="true" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="civilWarEraTest12.swf" width="1920" height="1080">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="15.0.0.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">swfobject.registerObject("FlashID");</script>
</body>
try:
///////HTML/////////
<body>
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="200">
<param name="movie" value="animation.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="15.0.0.0" />
<param name="allowFullScreen" value="true" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="civilWarEraTest12.swf" width="1920" height="1080">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="15.0.0.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<param name="allowFullScreen" value="true" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
<script type="text/javascript">swfobject.registerObject("FlashID");</script>
</body>
What do you mean? Do I need to change any of the actionScript , because I already published at 100% and I have a function for no scale here.
FullScreenBut.addEventListener(MouseEvent.CLICK, goFullScreen);
function goFullScreen(event:MouseEvent):void
{
setFullScreen();
}
function setFullScreen():void
{
if (stage.displayState== "normal")
{
stage.displayState="fullScreen";
stage.scaleMode = StageScaleMode.NO_SCALE;
}
else
{
stage.displayState="normal";
}
}
As for javaScript, I know know a little bit but not much. Could you point the way? Do I need to remove my button for fullscreen in flash?
No I have a 1920x1080 stage that needs to fit in a 500x281 place on a webpage. The problem is that when I go fullscreen the screen is bigger than the moniter and when I exit "normal" == 1920x1080. (I need "normal" to == 500x281 and "fullscreen" == 100% width and 100% height) So the animation is bigger than 500x281, so it looks cropped
On some moniters fullscreen is bigger than the screen. I don't think I have a flv playback comp. I check their resolution and if their browser was zoomed in, both neg.
//////////////////////HTML
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="281" id="civilWarEraTest12" align="left">
<param name="movie" value="civilWarEraTest12.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="civilWarEraTest12.swf" width="500" height="281">
<param name="movie" value="civilWarEraTest12.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" /></a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
try:
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="25%" height="25%" id="civilWarEraTest12" align="left">
<param name="movie" value="civilWarEraTest12.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="civilWarEraTest12.swf" width="25%" height="25%">
<param name="movie" value="civilWarEraTest12.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" /></a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
click file>publish settings>html and select flash with fullscreen for your template, size percent and select 25 percent width and 25 percent height and for the bottom 4 comboboxes select default, default, center and center.
if that fails, attach a screen shot of that publish settings panel.
comment out that scaleMode or change it when returning to normal:
function goFullScreen(event:MouseEvent):void
{
setFullScreen();
}
function setFullScreen():void
{
if (stage.displayState== "normal")
{
stage.displayState="fullScreen";
//stage.scaleMode = StageScaleMode.NO_SCALE;
}
else
{
stage.displayState="normal";
}
}
also, change those percents from 25% to 500/1920 x 100% ~= 26%
in your publish settings change 25% to 26%.
the only problem i see at https://dl.dropbox.com/u/72608572/test1.html
is when returning from fullscreen. that problem is caused by your scalemode.
what problem(s) do you see with test1.html?
North America
Europe, Middle East and Africa
Asia Pacific