[SWFObject] SWF does not play on first load (both IE and FF)

Sander Kruger s.kruger at 3-gsp.com
Fri Dec 22 01:43:08 PST 2006


Ha, I finally found out what the problem was: My Apache 2.0.58 mod_deflate
configuration compresses SWF files and sends them with chunked transfer
encoding to the browser.

For some reason, none of my browsers detect the last chunk and subsequently
start up the flash content. It also explains why a browser refresh does the
trick: the content is read from the cache and hence is not chunked.

The solution is to add swf to the extensions that are not to be compressed
by mod_deflate:

    SetEnvIfNoCase Request_URI \
      \.(?:gif|jpe?g|png|swf)$ no-gzip dont-vary

Sander Kruger

-----Original Message-----
From: swfobject-bounces at lists.deconcept.com
[mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Steve Kamerman
Sent: woensdag 20 december 2006 22:27
To: swfobject at lists.deconcept.com
Subject: Re: [SWFObject] SWF does not play on first load (both IE and FF)

I tested them all in IE6, IE7, FF1.5 and FF2.0 and they all worked fine
for the first 2 links and 404 on the last one.

Steve Kamerman
http://devel.teratechnologies.net/swfhelp/

-----Original Message-----
From: swfobject-bounces at lists.deconcept.com
[mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Tech Soap
Sent: Wednesday, December 20, 2006 4:02 PM
To: swfobject at lists.deconcept.com
Subject: Re: [SWFObject] SWF does not play on first load (both IE and
FF)

I was able to see the Adobe object in FF 2.01 with no problem.
I could not however see it with the SWFObject in FF
I could also not see your third example because of a 404 error.

:: -----Original Message-----
:: From: swfobject-bounces at lists.deconcept.com 
:: [mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of 
:: Sander Kruger
:: Sent: Wednesday, December 20, 2006 3:57 PM
:: To: swfobject at lists.deconcept.com
:: Subject: Re: [SWFObject] SWF does not play on first load 
:: (both IE and FF)
:: 
:: I'm not sure what the Flash publish function does. I always 
:: upload my apps to the server with Filezilla. Anyway, to 
:: reproduce the problem, I've uploaded the files at the 
:: following address:
:: 
:: http://service.otherphone.com/test/TestObject.html (Adobe) 
:: http://service.otherphone.com/test/TestObject_so.html 
:: (SWFObject) 
:: http://service.otherphone.com/test/TestObject_so2.html 
:: (SWFObject, no express install)
:: 
:: The flash movie is the example from the livedocs for the 
:: Panel class. If I empty my cache and point my browser to any 
:: of the above URL's, I just get a blank page.
:: 
:: If I open the same wrappers from my local hard-disk 
:: (file://), the application plays without a problem.
:: 
:: Sander.
:: 
:: -----Original Message-----
:: From: swfobject-bounces at lists.deconcept.com
:: [mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of 
:: domenics at gmail.com
:: Sent: woensdag 20 december 2006 20:27
:: To: swfobject at lists.deconcept.com
:: Subject: Re: [SWFObject] SWF does not play on first load 
:: (both IE and FF)
:: 
:: This happens even if you use flashs publish function? Have 
:: you tried disabling the extras (version detection, etc) and 
:: using a straight embed/object to narrow things down? Does 
:: this happen on other computers?
:: Does it happen on a local publish?
:: 
:: Domenic
:: 
::   
:: 
:: -----Original Message-----
:: From: "Sander Kruger" <s.kruger at 3-gsp.com>
:: Date: Wed, 20 Dec 2006 18:46:17
:: To:<swfobject at lists.deconcept.com>
:: Subject: [SWFObject] SWF does not play on first load (both IE and FF)
:: 
:: Hello,
:: 
:: I'm new to this list. I worked through the November and 
:: December archive but didn't find a solution. I have a 
:: problem with my Flash app wrapper using either SWFObject 1.5 
:: or the Adobe wrapper:
:: 
:: When a Flash app is loaded for the first time, it doesn't 
:: play. The player just shows the background color. I use 
:: Flex/AS3 and Flash Player 9. This occurs both in IE6 and in 
:: FF1.5.0.8. If the browser finds the SWF in the cache, no 
:: problem. But if not, it doesn't play.
:: 
:: Does anyone know how to make sure the application starts 
:: automatically, every time?
:: 
:: Here's some more diagnostics about the problem:
:: To get the movie to start, I can either select 'forward' 
:: from the context menu (FF only), select 'play' from the 
:: context menu (IE and FF) or refresh the page (IE only).
:: 
:: So far I've tried:
:: . disabling the pre-loader
:: . setting the 'play' and 'loop' params
:: . to no avail.
:: 
:: I did manage to create 2 workarounds in FF, neither being a 
:: very elegant
:: one:
:: 1) ------------------------------------------------------
:: add an alert after the so.write('flashcontent'). The code becomes:
:: 
::     var so = new SWFObject("TestObject.swf", "TestObject", 
:: "100%", "600", "9");
::     so.useExpressInstall('expressinstall.swf');
::     so.addParam("loop", "false");
::     so.write("flashcontent");
:: 
::     alert( "application is starting" );
:: 
:: Somehow, the alert makes the Flash movie start. confirm() 
:: works as well, but I didn't find any less intrusive commands 
:: that do the trick.
:: 
:: 2) ------------------------------------------------------
:: Add a timer to kick off the play after loading. The code 
:: looks like this:
:: 
::     var so = new SWFObject("TestObject.swf", "TestObject", 
:: "100%", "600", "9");
::     so.useExpressInstall('expressinstall.swf');
::     so.addParam("loop", "false");
::     so.write("flashcontent");
:: 
::     setTimeout( 'tryPlayFlash();', 1000 );
:: 
::     function tryPlayFlash()
::     {
::       if (document. TestObject)
::       {
::         if (document. TestObject.Play)
::           document. TestObject.Play();
::         else
::           alert('Cannot communicate with ActionScript');
::       }
::       else
::         alert('Can\'t find the Flash movie');
::     }
:: 
:: This is a rather bad one because it will restart the movie 
:: if it plays correctly.
:: 
:: And I haven't found any of this to work in IE. If you have 
:: encountered the same problem, please let me know if there is 
:: a workaround.
:: 
:: Regards,
:: S. Kruger
:: 
:: _______________________________________________
:: SWFObject mailing list
:: SWFObject at lists.deconcept.com
:: http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
:: _______________________________________________
:: SWFObject mailing list
:: SWFObject at lists.deconcept.com
:: http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
:: 
:: _______________________________________________
:: SWFObject mailing list
:: SWFObject at lists.deconcept.com
:: http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
:: 

_______________________________________________
SWFObject mailing list
SWFObject at lists.deconcept.com
http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com

_______________________________________________
SWFObject mailing list
SWFObject at lists.deconcept.com
http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com




More information about the Swfobject mailing list