flex - Deployed SWF not accessible in Firefox -
i'm using swfobject.js
deploy load flex applet. unfortunately, while i'm able run/debug in firefox via flash builder, cannot access deployed applet via url -- applet doesn't load/start. can access deployed applet via url both ie 8 , chrome 7. causing issue in firefox? below swfobject code , produced object tag:
<script type="text/javascript"> window.onload = function() { <!-- version detection, set min. required flash player version, or 0 (or 0.0.0), no version detection. --> var swfversionstr = "10.0.0"; <!-- use express install, set playerproductinstall.swf, otherwise empty string. --> var xiswfurlstr = "playerproductinstall.swf"; var flashvars = {}; var params = {}; params.quality = "high"; params.bgcolor = "white"; params.allowscriptaccess = "samedomain"; params.allowfullscreen = "true"; var attributes = {}; attributes.id = "flexui"; attributes.name = "flexui"; attributes.align = "middle"; swfobject.embedswf( "flexui.swf", "flashcontent", "100%", "100%", swfversionstr, xiswfurlstr, flashvars, params, attributes); <!-- javascript enabled display flashcontent div in case not replaced swf object. --> swfobject.createcss("#flashcontent", "display:block;text-align:left;"); }; </script> <div> <object type="application/x-shockwave-flash" id="flexui" name="flexui" align="middle" data="flexui.swf" width="100%" height="100%"> ... </object> </div>
i'm using swfobject.js deploy flex applet
swobject.js javascript file; , javascript files text.
to "deploy" flex application means export release build, , moves files development machine production machine.
there no way "deploy" swobject.js.
most people export release build using flash builder (or other tooling) , upload production machine using ftp or across network.
you may deploying application javascript , other html files including swfobject.js. if so, suggest @ generated index.html page generated in 'release build' folder. see different there not in "web page." based on you've shown of web page integration script ,it not using swfobject.
here flex 4 default html template:
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <!-- saved url=(0014)about:internet --> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <!-- smart developers view source. application built using adobe flex, open source framework building rich internet applications delivered via flash player or desktops via adobe air. learn more flex @ http://flex.org // --> <head> <title>${title}</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <!-- include css eliminate default margins/padding , set height of html element , body element 100%, because firefox, or gecko based browser, interprets percentage percentage of height of parent container, has set explicitly. initially, don't display flashcontent div won't show if javascript disabled. --> <style type="text/css" media="screen"> html, body { height:100%; } body { margin:0; padding:0; overflow:auto; text-align:center; background-color: ${bgcolor}; } #flashcontent { display:none; } </style> <!-- enable browser history replacing usebrowserhistory tokens 2 hyphens --> <!-- begin browser history required section ${usebrowserhistory}> <link rel="stylesheet" type="text/css" href="history/history.css" /> <script type="text/javascript" src="history/history.js"></script> <!${usebrowserhistory} end browser history required section --> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> <!-- version detection, set min. required flash player version, or 0 (or 0.0.0), no version detection. --> var swfversionstr = "${version_major}.${version_minor}.${version_revision}"; <!-- use express install, set playerproductinstall.swf, otherwise empty string. --> var xiswfurlstr = "${expressinstallswf}"; var flashvars = {}; var params = {}; params.quality = "high"; params.bgcolor = "${bgcolor}"; params.allowscriptaccess = "samedomain"; params.allowfullscreen = "true"; var attributes = {}; attributes.id = "${application}"; attributes.name = "${application}"; attributes.align = "middle"; swfobject.embedswf( "${swf}.swf", "flashcontent", "${width}", "${height}", swfversionstr, xiswfurlstr, flashvars, params, attributes); <!-- javascript enabled display flashcontent div in case not replaced swf object. --> swfobject.createcss("#flashcontent", "display:block;text-align:left;"); </script> </head> <body> <!-- swfobject's dynamic embed method replaces alternative html content flash content when enough javascript , flash plug-in support available. div hidden doesn't show when javascript disabled. --> <div id="flashcontent"> <p> view page ensure adobe flash player version ${version_major}.${version_minor}.${version_revision} or greater installed. </p> <script type="text/javascript"> var pagehost = ((document.location.protocol == "https:") ? "https://" : "http://"); document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" + pagehost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='get adobe flash player' /></a>" ); </script> </div> <noscript> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="${width}" height="${height}" id="${application}"> <param name="movie" value="${swf}.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="${bgcolor}" /> <param name="allowscriptaccess" value="samedomain" /> <param name="allowfullscreen" value="true" /> <!--[if !ie]>--> <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}"> <param name="quality" value="high" /> <param name="bgcolor" value="${bgcolor}" /> <param name="allowscriptaccess" value="samedomain" /> <param name="allowfullscreen" value="true" /> <!--<![endif]--> <!--[if gte ie 6]>--> <p> either scripts , active content not permitted run or adobe flash player version ${version_major}.${version_minor}.${version_revision} or greater not installed. </p> <!--<![endif]--> <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> <!--[if !ie]>--> </object> <!--<![endif]--> </object> </noscript> </body> </html>
Comments
Post a Comment