Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any reason to ditch javascript flash embedding methods in 2011?

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?

like image 878
meder omuraliev Avatar asked Nov 23 '10 19:11

meder omuraliev


People also ask

Is HTML replacing Flash?

HTML5 has all but replaced Flash, Silverlight, XHTML and other platforms as a safer, more versatile solution on the web.

Is Flash better than HTML?

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.

Can you convert Flash to HTML5?

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.

Why do we use Flash CSS?

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.


2 Answers

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 :)

like image 27
gthmb Avatar answered Sep 21 '22 18:09

gthmb


The disadvantages:

  1. 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.

  2. 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.

  3. 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.

like image 158
Rajat Avatar answered Sep 19 '22 18:09

Rajat