Reputation: 5006
I have this idea for embedding flash into HTML. I want to favor quick optimistic loading, instead of defending against the minor case at which people do not have a high enough version installed. I think this could improve loading time, since the flash object can now start loading in the DOM stage. Let's say the Flash version I want to target is 10.1.
Version-optimistic Flash loading:
A. If the version installed is sufficient, go on.
B. If the version does not meet the required version, throw away the previously embedded object and embed the express install.
My question:
Is there any good reason to favor the whole swfobject loading over this approach?
Upvotes: 0
Views: 90
Reputation: 4581
SWFObject includes a static publishing option. You can use markup to embed the SWF and avoid JavaScript altogether, much like you describe. By default, SWFObject's static publishing method uses Flash Player detection to ensure you have the specified minimum version. If not, it strips the <object>
tags from the markup and displays the fallback content instead (or invokes ExpressInstall, if appropriate).
SWFObject's static publishing is explained in more detail here:
Upvotes: 1