Copy link to clipboard
Copied
Hello, i been working on my project i been trying to make this file on full screen for more than 2 months but isnt working please can anyone here help me and tell me what im doin wrong here is my code!
<script type='text/javascript'>
function onFailFlashembed() {
var inner_html = '<div class="flashFailHead">Instala el Adobe Flash Player</div>\n\
<div class="flashFailHeadText">Para jugar a DarkOrbit, necesitas el Flash Player m�s actual. �Solo tienes que instalarlo y empezar a jugar!\n\
<div class="flashFailHeadLink" style="cursor: pointer">Desc�rgate aqu� el Flash Player gratis: <a href=\"http://www.adobe.com/go/getflashplayer\" style=\"text-decoration: underline; color:#A0A0A0;\">Descargar Flash Player<\/a> </div></div>';
document.getElementById('container').innerHTML = inner_html;
}
function expressInstallCallback(info) {
// possible values for info: loadTimeOut|Cancelled|Failed
onFailFlashembed();
}
jQuery(document).ready(
function(){
if(window.innerHeight > window.innerWidth){
var landscapeOrPortrait = 'portrait';
} else {
var landscapeOrPortrait = 'landscape';
}
var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
flashembed("container", {"src": "spacemap/main.swf","version": [11,0],"expressInstall": "swf_global/expressInstall.swf","width": width,"height": height,"wmode": "direct","bgcolor": "#000000","id": "main"},
i also tryred changing width and height to 100% when i do that screen stays just black i can't see anything maximum of size that i did was 1280x900 it wont be bigger
can anyone help me to fix it?
1 Correct answer
I just published a test SWF with these settings and it scaled full screen without me even having to modify the HTML at all.
Copy link to clipboard
Copied
Just enable scaling in your SWF, then embed it in a DIV with the width and height properties set to "100%", and the Flash object widths and heights all set to "100%".
StageScaleMode - Adobe ActionScript® 3 (AS3 ) API Reference
Copy link to clipboard
Copied
please can u tell me step by step how to enable that
Copy link to clipboard
Copied
I just did. It really is that simple.
In fact I think you don't even have to explicitly set the stage scale mode, since SHOW_ALL should be the default.
Copy link to clipboard
Copied
<div id="container" style="width:100%;height:1000px;overflow:hidden;">
<object id="main" name="main" data="spacemap/main.swf" type="application/x-shockwave-flash" width="100%" height="100%">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="quality" value="high">
<param name="wmode" value="direct">
<param name="bgcolor" value="#000000">
<param name="scale" value="exactfit">
Still not working still max screen of it is 1280x900!
Copy link to clipboard
Copied
<div
id="container"
style="
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
overflow: hidden;">
Copy link to clipboard
Copied
still not working still looks like this http://prntscr.com/en9xx5
Copy link to clipboard
Copied
I just published a test SWF with these settings and it scaled full screen without me even having to modify the HTML at all.

