Hi Ben. The issue seem to be within your swf code rather than with SWFObject.
I used the same HTML code you had defined in your page and then changed the swf to a test swf file. The swf embeds / resizes correctly in all browsers including Chrome: http://www.misterhee.com/tests/kenkai/kenkai.test2.html The code inside the swf (frame 1) Stage.align = "TL"; Stage.scaleMode = "noscale"; function doStageStuff() : Void { BG._width = Stage.width; BG._height = Stage.height; // test MC to stay in bottom right corner test._x = Stage.width - test._width; test._y = Stage.height - test._height; } var stageListener : Object = {}; stageListener.onResize = function() { doStageStuff(); } Stage.addListener(stageListener); doStageStuff(); Aran BTW - you should run your intro page HTML through a W3C page validator - You have a whole bunch of things to fix there. Also, your about page on the actual site is very crazy code wise (it is like two separate HTML pages have been combined - there are two whole sets of <html>, <head>, and <body> tags on the one page... -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of ben.r Sent: Wednesday, 18 February 2009 11:00 PM To: SWFObject Subject: Re: Problems with Chrome (full screen) On the main timeline there is a preloader on frames 1&2, and (bg = background movieClip) bg._width = Stage.width; bg._height = Stage.height; Stage.scaleMode = "noScale"; //only on frame 1 then on frame 5 (mc = movieClip that contains everything): mc._y = Stage.height/2; mc._x = Stage.width/2; function stageResize() { bg._width = Stage.width; bg._height = Stage.height; if(introOver == true){ if(419>Stage.height){ mc.gotoAndStop("small"); }else if(584<Stage.height){ mc.gotoAndStop("big"); }else{ mc.gotoAndStop("medium"); } } } function center() { mc._y = Stage.height/2; mc._x = Stage.width/2; } myListener = new Object(); myListener.onResize = function() { stageResize(); center(); }; Stage.addListener(myListener); --------- it is on www.je-ben.com Ben On Feb 18, 4:09 am, "Aran Rhee" <[email protected]> wrote: > So if you debug the Stage values (either output to a textfield / trace() to > the debug player console) are they updating / as expected? > > I would set the scalemode and alignment within the swf itself and add a > onResize handler to that things get scaled / positioned each time the > browser changes size. > > If you have a look at the FAQ (http://code.google.com/p/swfobject/wiki/faq > (How can I create a SWF that will encompass 100% of the browser window)), > you can see there is a note about resizing etc: > > "NOTE: For positioning elements always define a resize handler, because a > user can resize the browser window and in Internet Explorer (using the > dynamic publishing method) the stage size is only available on first load. > When reloading or revisiting a page it will initially be 0, causing the > Flash player to keep on triggering the stage.resize event until it receives > its current value" > > (there is also an example AS3 code snippet on resize handling) > > At the end of the day, AC_RunActiveContent.js and swfobject should output > the same <object> definitions (although a better comparison should be > swfobject dynamic publishing vs. AC_FL_RunContent); > > Feel free to post a link to your page. > > Aran > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > > Behalf Of ben.r > Sent: Wednesday, 18 February 2009 12:19 PM > To: SWFObject > Subject: Re: Problems with Chrome (full screen) > > Sorry, I forgot to say that there is a movieClip bg used as background > (because it changes color at some point). > > actionscript on frame 2 : > > bg._width = Stage.width; > bg._height = Stage.height; > > ...this code does not work the bg is 470 x 585 as the swf. > > if I use the following html everything works (IE, FF, Chrome), but I > need to display alternative content if the user does not have flash > player: > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> > <head> > > <style> > > body {margin:0px;padding:0px} > > </style> > <script language="javascript">AC_FL_RunContent = 0;</script> > <script src="AC_RunActiveContent.js" language="javascript"></script> > </head> > <body bgcolor="#ffffff"> > <!--url's used in the movie--> > <!--text used in the movie--> > <!-- saved from url=(0013)about:internet --> > <script language="javascript"> > if (AC_FL_RunContent == 0) { > alert("This page requires AC_RunActiveContent.js."); > } else { > AC_FL_RunContent( > 'codebase', > 'http://download.macromedia.com/pub/shockwave/cabs/ > flash/swflash.cab#version=8,0,0,0', > 'width', '100%', > 'height', '100%', > 'src', 'intro', > 'quality', 'high', > 'pluginspage', > 'http://www.macromedia.com/go/getflashplayer', > 'align', 'middle', > 'play', 'true', > 'loop', 'true', > 'scale', 'noscale', > 'wmode', 'window', > 'devicefont', 'false', > 'id', 'intro', > 'bgcolor', '#ffffff', > 'name', 'intro', > 'menu', 'true', > 'allowFullScreen', 'false', > 'allowScriptAccess','sameDomain', > 'movie', 'intro', > 'salign', 'lt' > ); //end AC code > } > </script> > <noscript> > <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" > codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/ > swflash.cab#version=8,0,0,0" width="100%" height="100%" id="intro" > align="middle"> > <param name="allowScriptAccess" value="sameDomain" /> > <param name="allowFullScreen" value="false" /> > <param name="movie" value="intro.swf" /><param name="quality" > value="high" /><param name="scale" value="noscale" /><param > name="salign" value="lt" /><param name="bgcolor" value="#ffffff" /> > <embed src="intro.swf" quality="high" scale="noscale" salign="lt" > bgcolor="#ffffff" width="100%" height="100%" name="introMartina" > align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" > type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> > </object> > </noscript> > </body> > </html> > > any idea? > > On Feb 17, 11:10 pm, "Aran Rhee" <[email protected]> wrote: > > So the 100% examples in the SWFObject test suite fail in Chrome as well? > (I > > don't have chrome installed presently, so I can't test myself sorry) > > Dynamic:http://www.bobbyvandersluis.com/swfobject/testsuite_2_1/test_dynamic > _... > > wserflash.html > > Static:http://www.bobbyvandersluis.com/swfobject/testsuite_2_1/test_fullbrow > ... > > h.html > > > Also, is your centering code on frame 1? I have found that sometimes you > > have to wait 1 frame before the Stage values are correctly set. > > > Aran > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] On > > > Behalf Of ben.r > > Sent: Tuesday, 17 February 2009 11:01 PM > > To: SWFObject > > Subject: Problems with Chrome (full screen) > > > Hi, > > In FF and IE works fine, but Chrome shows top & left margin and the > > movie is not centered. I have a center function in actionscript: > > > function center() { > > mc._y = Stage.height/2; > > mc._x = Stage.width/2; > > } > > > 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" xml:lang="en" lang="en"> > > <head> > > <title></title> > > <style type="text/css"> > > <!-- > > html, body, #content, myFlash { height:100%; } > > body { margin:0; padding:0; overflow:hidden; } > > --> > > </style> > > <meta http-equiv="Content-Type" content="text/html; > > charset="utf-8" /> > > <script type="text/javascript" src="swfobject.js"></ > > script> > > <script type="text/javascript"> > > swfobject.registerObject("myFlashContent", "8.0.0", > > "expressInstall.swf"); > > </script> > > </head> > > <body> > > <div id="content"> > > <object id="myFlash" classid="clsid:d27cdb6e- > > ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/ > > pub/shockwave/cabs/flash/swflash.ca > > b#version=8,0,0,0" width="100%" height="100%"> > > <param name="movie" value="intro.swf" /> > > <param name="salign" value="lt" /> > > <param name="scale" value="noscale" /> > > <!--[if !IE]>--> > > <object type="application/x-shockwave-flash" > > data="intro.swf" width="100%" height="100%"> > > <param name="scale" value="noscale" /> > > <param name="salign" value="lt" /> > > <!--<![endif]--> > > <table width="100%" height="100%" border="0" > > align="center"> > > <tr> > > <td><div align="center"> > > <p> > > <img width="461" height="580" alt="" > > src="intro.jpg" usemap="#Map" border="0"/> > > <map > > name="Map"> > > <area shape="RECT" > > coords="59,484,95,500" href="http://www"/> > > <area shape="RECT" > > coords="44,518,95,534" href="http://www"/> > > <area shape="RECT" > > coords="11,554,95,570" href="http://www"/> > > </map> > > </p> > > </div></td> > > </tr> > > </table> > > <!--[if !IE]>--> > > </object> > > <!--<![endif]--> > > </object> > > </div> > > </body> > > </html> > > > ---------------- > > tnx for help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
