-->

Flash vs Javascript [closed]

2019-04-01 15:35发布

问题:

Update 2:

To add swf in web page Swf Object 2.0 is most used method, which is a javascript library, so flash will be depend on availability of JavaScript.

So if javascript disabled then flash will not play.

I always heard approx 5% users in the world keep JavaScript turned off.

But Adobe claims

Flash content reaches 99% of Internet viewers

http://www.adobe.com/products/player_census/flashplayer/

Is it true even iphone, ipad and blackberry doesn't support Flash?

if it's true then if same thing we can achieve with FLASH and JavaScript , then should we go for flash (If we are not considering iphone, ipad and blackberry)?

And if we also need support on iphone, ipad and blackberry for our website/web applications, then should we never use flash?

Update:

Firefox's plugin

Noscript has downloaded 67,446,249 times till date

but Flashblock only 8,723,436 times

Is it means people dislike JavaScript more than Flash?

回答1:

A few things to consider:

These days, users who disable JavaScript usually do so with a tool like NoScript, which also disables Flash. That means you probably would't reach any more users by developing in Flash.

There are many new users browsing with mobile devices every day, and as you pointed out, some of the most popular ones don't support Flash at all. Even those that support Flash often don't run it very well. On the other hand, nearly all web-enabled devices are now being made with optimized JavaScript support.

Unlike Flash, JavaScript is not controlled by a single company. That means many more people are working to improve its performance, reliability, and features. Your users will benefit from this in the long run.

If you are able, JavaScript instead of Flash.



回答2:

If you want mobile to work, go for Javascript. You can always politely ask your non-JS users to turn it on for your website.



回答3:

From the link you posted (emphasis mine):

Adobe® Flash® Player is the world's most pervasive software platform, used by over 2 million professionals and reaching 99% of Internet-enabled desktops in mature markets as well as a wide range of devices.

A wide range of devices do exclude iSteve mobile devices and a few others.

And if we also need support on iphone, ipad and blackberry for our website/web applications, then should we never use flash?

As for never, it's a question only S.teve can answer :)

You added an accessibility tag (and asked many related questions before), so let me answer from this point of view: your website should work with or without Javascript and with or without Flash, a PDF reader, MS Office, Silverlight, with or without a mouse, images, CSS, etc

Usability will suffer from the lack of JS but your website should still work and no information should be hidden and no task should be impossible to realize: it's called graceful degradation I believe.

Flash
Flash objects should be accessible, Adobe has a section of its site dedicated to accessibility. The object element should have an alternative at the end of object or nearby, this alternative can be another object nested and have its own alternative, etc but the last alternative should be accessible (a text, an image with alt or an HTML page). You can read about WCAG 2.0 techniques G58: Placing a link to the alternative for time-based media immediately next to the non-text content, G69: Providing an alternative for time based media and many others.

JS
I've used NoScript for a long time and have seen more than often a common failure: using Javascript to detect Flash. That won't help.
Another one is the meaningless alternative "Get the Flash player at Adobe website". Yeah thanks, it's running fine, the only problem is with the detection script that won't run ...
So don't try to detect Flash, just put it in an object element and provide (a) meaningful alternative(s).

That will address both the 97% and 99% users, both the remaining 3% and 1% ones as well as, finally, those with Flash installed but who can only guess what unlabeled buttons in the SWF can do or worse get trapped in the Flash object while tabulating. These are blind users for the former and blind users as well as keyboard-only surfers for the second part.
From a recent survey, 75% of blind users keep JS running and it's unspecified for partially sighted people (probably more, keeping in mind that there are 10 times more partially sighted than blind people).



回答4:

Because your audience as previous stated, suggested that there is a market that flash does not penetrate (Mobile). Because of this you would be effectively shutting out a huge amount of realistic visitors. Just because a statistic says 99% of all web viewers that doesn't necessarily mean for your specific application audience...



回答5:

Also note that while Flash is installed in most PCs, the penetration rates by version vary - see Adobe's official Enterprise and PC penetration rates broken down by version.

Hence, if you're attempting to write something in the latest version of Flash, the percentage of users who can actually view your content may be much less than 99%.

Also, since Javascript support is built into almost all browsers, it's only a matter of whether users want to turn it on.



回答6:

if it's true then if same thing we can achieve with FLASH and JavaScript , then should we go for flash (If we are not considering iphone, ipad and blackberry)?

You really should consider iphone, ipad and blackberry.. even if they're not a major portion of your visitors, it's where things are moving, and you should be mindful of those platforms..

If as you say the same thing can be achieve with javascript or flash, go with JS. it'll save dev time, seo issues, running maintenance costs...

You'd be silly to start and all-flash project these days.. unless it's a really specific niche product that can only work with flash..

There's nothing wrong with a sprinkle of flash now and then, but an all-flash solution I wouldn't recommend



回答7:

You have to ask yourself of that 99%, how many have the version of Flash loaded that you would support? It's likely that those using Internet Explorer 6 are not using the latest version of Flash.



回答8:

To answer your question about Flash and the iPhone iPad etc (not sure about the Blackberry). They do not, and almost certainly will not, support Flash. Apple posted an article about why they have made this decision here.
It basically boils down to battery life and application quality, according to the article. They say they are focusing mainly on standards based approaches (HTML5, javascript etc)



回答9:

After working with both Javascript and Flash for several years, here is my perspective-

Use Flash when you need to play Video, Audio or use players, Complex Animation, 3-Dimensional draws, and complex multi-media.

Use Javascript when you need simple drop-downs, forms, popups, tooltips, accordions, tabPanels etc.

Flash is going to be there till all browsers implement the w3c standards consistently and this is the real big deal and the reason why Flash came into picture. So for most software strategies in companies, building apps needing flash is perfectly fine as most of the companies are having to build a seperate native app strategies on these IPhones and IPads.

Couple of interesting things to look out-

  1. Javascript is slower on IPhone/IPad.Test here on your PC's and IPads and compare.
  2. Flash CS5 will export to HTML5 Canvas.
  3. Flash Player 10.1 has significant enhancements and comes out of the box with Android 2.2.


回答10:

Okay, where to begin? First I would challenge the party that wrote this blurb/ question to review the Adobe website for more than a Steve Jobs Fan-boy perspective on web publishing technology and RIA developement.

NVIDIA, Google (Android OS), RIM, PalmOne (now HP), Nokia, and a laundry list of OEMs have all joined the OPEN SCREEN Project. This organization and it's various partners have all joined forces to ensure that ADOBE FLASH (10.1) and AIR (2.0) is optimized for mobile devices primarily through hardware acceleration. The iphone came out in 2007 and WOW (past tense). Now as we prepare to enter a new decade the technology that drove iphone sales is current tech (see: old news). Soon all of the Jobs-Fanboys will be the only ones without FLASH or AIR (note: WIRED ipad publication isn't FLASH, if that wasn't already obvious.)

Additionally for the record Adobe does make HTML5 tools. It was never Flash VS HTML5. To imply that you either have to choose FLASH OR HTML is just plain silly and shows how well your apple branded mind-conditioning and propaganda has over come you. I won't invest the time to address the folly you posted about JavaScript and user disabling it.