The benefits of embedding flash with JS to my knowledge:
navigator
object and see what flash versions are installed, possibly branch out on that and feed different content based on thissrc
, flashvars
, dimensionsThe disadvantages:
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?
HTML5 has all but replaced Flash, Silverlight, XHTML and other platforms as a safer, more versatile solution on the web.
Flash is not completely SEO friendly and does not support much needed accessibility. On the other hand, HTML5 is much more flexible, and can be used across all browsers and devices, something that is not possible in Flash.
There are multiple tools that you can use for Flash to HTML5 conversion, including Adobe Captivate, Lectora Inspire, Adobe Wallaby, Google Swiffy, Sothink – Flash to HTML5 conversion tool, Apache FlexJS and Articulate Storyline. It is a free web editor for Flash to HTML5 conversion.
People used Flash because it could do things that HTML, CSS, and JavaScript couldn't do at the time. It's incredible to see how far web standards have come (and what's coming). We can do a lot today that was previously only possible with Flash.
I don't see a good reason to ditch JS flash embedding. SWFObject is pretty ubiquitous these days (pseudo-standard even!), and even Adobe recommends using it.
It makes sticky things like handling player version requirements and allowing the user to update their Flash plugin easy and straight forward.
SWFObject aside, it's my opinion that being able to use client side logic to embed content for any plugin will always be the way to go; it affords more opportunity to read into your user's environment, and deliver the appropriate content.
I suppose an argument can be made that it adds yet another requirement on the client side to deliver your content, but I think the vast majority of user's will have JS enabled... especially the users who are willing to consume Flash media.
Hope that helps :)
The disadvantages:
devices with no flash but JS enabled will completely fail
As @Lars pointed out in his comment, I think detecting Flash via JS is a failsafe way to inject different content(swf) for different platforms(OS, Browser, Flash Player version). The devices which have both Flash and JS disabled are the devices where all hell might break loose but that would be a very small percentage. I can't think of an easy way to circumvent that.
people get lazy and don't provide fallback content.
This obviously is very subjective. I have had very little experience using SwfObject but in my case, we were falling back to a pure HTML DOM based solution using lots of JS to simulate the module when we detected a NO FLASH situation. My point is that with SwfObject, providing alternative content is very easy and I dont see why any good developer wont do that.
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.
I think i would agree on this one to an extent. Different embedding methods are a mess. There is this thread on StackOverflow discussing this issue: Best way to embed flash in html
There are situations where there is no alternative but to use Flash, for instance: a File Uploader with upload percentage feedback (as the regular INPUT tag Type FILE is just too archaic). Granted there is the new way to do upload progress bar using just javascript but it wont work in you know IE :)
In such situations, there is no way to get rid of Flash IMHO.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With