I’m embeding flash player in HTML by inlining such HTML:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0"
width="470" height="320">
<param name="movie" value="http://myserver.com/app.swf"></param>
<param name="FlashVars" value="src=http://myserver.com/mymovie.flv"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://myserver.com/strobe/StrobeMediaPlayback.swf"
type="application/x-shockwave-flash"
allowscriptaccess="always" width="470" height="320"
FlashVars="src=http://myserver.com/mymovie.flv">
</embed>
</object>
I would like to receive callback onLoad or onError informing if the SWF application was properly downloaded and initialized. Is is possible? Does flash plugin expose such events for javascript?
If you embed the SWF with SWFObject, it’s
embedSWF()method has an optional callback parameter that you can use to know if embedding has completed successfully or failed.Here is the method signature:
I’ve never seen any other way to get this information, but then again I always use SWFObject 🙂