문제

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:

  1. Embed the flash you want to have as HTML tags
  2. After that, check the actual flash version with Javascript

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?

도움이 되었습니까?

해결책

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:

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top