The benefits of embedding flash with JS to my knowledge:

  • ability to query navigator object and see what flash versions are installed, possibly branch out on that and feed different content based on this
  • consistent method of attaching flash, as the script keeps the markup and usually you just need to specify the src, flashvars, dimensions
  • save time by relying on helper utilities to embed the swf and not worry about intricate details
  • ability to provide consistent fallback if embedding multiple objects per site.

The disadvantages:

  • devices with no flash but JS enabled will completely fail
  • people get lazy and don't provide fallback content
  • code is a mess if it needs to be cross-browser compatible. there are various bugs with common embed ( even youtube's ) and the "best" cross-browser seems to be nesting an object in an object per this. I realize though, I can use a server-side method and define the embedding code once and change it in one area, but this makes it not embeddable/usable in CMS textareas.

The pros seem to outweigh the cons. I haven't really worked enough with mobile content to get an accurate opinion. Can anyone think of reasons why/why not?

Edit
Report