jQuery Flash Resize Working in IE, but not FF
So, I have this problem where I have a script to resize a Flash doc dynamically. I have been working at this at least a half-dozen different ways, and have not been able to get it working.
In FF what it does it goes to full size, but will not resize to normal size. IE will go full screen and then back.
function fullScreen(){
var pageWidth = (jQuery(document).width() - 20);
if(jQuery("#main").css("width") != pageWidth + "px"){
jQuery("#main").width(pageWidth);
var percentInc = pageWidth / 900;
var ptWidth = parseInt(900 * percentInc.toFixed(2)) - 20;
jQuery("#pokerSystemWrapper").width(ptWidth).height(parseInt(ptWidth / 2.5));
jQuery("#fullscreen").html("Normal");
alert("Page Width: "+pageWidth+" - Main Width: "+jQuery("#main").css("width"));
}else{
alert("Page Width: "+pageWidth+" - Main Width: "+jQuery("#main").css("width"));
jQuery("#main").width("900");
jQuery("#pokerSystemWrapper").width("900").height("360");
jQuery("#fullscreen").html("Fullscreen");
alert("Page Width: "+pageWidth+" - Main Width: "+jQuery("#main").css("width"));
}
}
-
<div id="pokerSystemWrapper" width="900px" height="360px">
<object id="pokerSystem" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">
<param name="allowScriptAccess" value="sameDomain">
<param name="movie" value="pokertimer.swf">
<param name="quality" value="high">
<param name="allowFullScreen" value="true" />
<embed src="pokertimer.swf" quality="high" id="pokerTimer" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</object>
</div>
If you want to see the code in action, you can here:
http://mgc.selfip.com/hps/games/run/4
User:
b@x.com
Pass: test
Select Group->View Group: Gordon Pool Hall
And then open that link.
Problem is that IE works for the resize, but FF does not resize proper.