Uh, correction: you can use javascript to "do" a limited subset of flash. It's not as if smokescreen is going to let you convert chatroulette.com, or a DRM-protected flash video player, or twenty other things.
–
fenomasAug 12 '10 at 14:14

2

@fenomas I didn't think you understood the answer (the first line is a joke to emphasize how cool smokescreen was), or you did not read it completely. The second part talks about what you are saying. Please read it. And why the down vote? I'm no flash hater, nor html5/js slave.
–
naikusAug 12 '10 at 16:01

1

I don't downvote things for ideology, only accuracy ;) I just don't think it's correct to say that HTML5/JS are getting close to Flash's capabilities... either on the pure features side, or perhaps more importantly on external things like penetration, consistency, and tooling (for my money those sorts of things are responsible for a very big piece of Flash's developer share). To be honest, outside of vanilla video playback and ad banners I don't really think of Flash and HTML5 as competing technologies.
–
fenomasAug 12 '10 at 16:36

1

It obviously doesn't look like you do it for accuracy. Check your own 1st comment. It specifically talks about my first statement in the answer
–
naikusAug 13 '10 at 6:11

@fenomas: Your statements still don't make @naikus's answer incorrect, so I don't think the downvote was deserved. He isn't trying to say that HTML5 is better than Flash--in fact, there is nothing in his answer to suggest that. He was merely pointing out that a lot of things that are possible in Flash are also possible in HTML5.
–
Sasha ChedygovSep 4 '10 at 22:29

No, JavaScript cannot do what Flash does.
Maybe HTML5 w/ canvas,JavaScript w/ JQuery,CSS3, some Webkits and some SVG/JPG to handle pictures and animations can make an attempt at what Flash was 5-10 years ago.

Video

JavaScript - There is only one implementation I know that slice the video into JPEGs then dram it onto the canvas. No clue what happens if one wanted to stream a file.

<video> tag - Best thing to come along. I would not lie. But this is not JavaScript.

Audio

JavaScript - I remember once it could be used for MIDI files but then it needed compatibility checks based on the browser

<audio> tag - Same reasoning as <video> tag, it is not JavaScript

Animation

These are three places I know making the cream of the crop that can be made with JavaScript.

Note well.
Do not talk about Apple Demos ... that is a joke and all marketing. They have only optimized for their browser (Safari)

Also do not talk about what Steve did or did not say. He is a pro at marketing. The other steve (Steve Wozniak) is the engineer.

(1) I highly respect because Mr.Doob really pushed that <canvas> and JS . (2) Was great animation that could be accomplished by a teenager in Flash IDE 5 years ago ... way too much effort to make something so simple. (3) Is really good yet you start with the Flash File ^.^

Lines Of Code

In many cases ActionScript, better yet the Flash IDE make animation a breeze with half the lines of codes (or maybe even simple drag and drop on timelines) than JavaScript. Libraries such as JQuery were brought in to try to shorten the amount of code. Even then in most cases less code/implementation was needed in ActionScript.

Accessibility and Performance

This is in the hands of the developer and has nothing to do with the language. Flash is capable of providing deep linking with SWFAddress (Ajax), page resizing (Stage Scale) and so forth. People constantly talk about performance with Flash, yes this is true but this is poor design on the developer for memory management.

Updates

JavaScript will be limited by the <canvas> and other elements to achieve what Flash can do.How ? If issues started to occur in HTML5, what would you do ? Send in a bug request ? No ... you will wait a next 3-5 years for HTML6 specification.

No, definitely not. While both share some capabilities, like animations and interactive interfaces, JavaScript's and Flash's design philosophies differ fundamentally, and in terms of features in those fields, Flash is certainly way, way ahead.

And if it is the case, can it be a good idea to switch from Adobe Flash to JavaScript?

It might, depending on what exactly you are doing in Flash. If you outline that in more detail, you will certainly get more concrete answers.

It depends on what you consider "features". If you're building an arcade-style game, Flash has more features. If you're building a web site to promote a business, HTML+JavaScript offers a lot of "features" to users that Flash can't: users can resize the page, they can copy and paste the text, they can deep-link to pages within the site, they can create mash-ups, they can override the CSS of your site for accessibility, etc.
–
dmazzoniJun 27 '10 at 16:47

@dmazzone By "features", I mean animation and interactive design only. Editing to make that more clear.
–
Pekka 웃Jun 27 '10 at 16:53

2

@dmazzoni - with the exception of users overriding the stylesheet those other features you mentioned are all available in Flash/Flex.
–
apiguyJun 28 '10 at 13:35

The Apple HTML5 demos (left parts)
only work with Safari (4.7% of all
users on all devices). Some HTML5
features work, others won't work on
other browsers. As a matter of fact,
HTML5 is not really a standard at all.
The Flash TODAY demos (right parts)
show how 97% of all websurfers can
experience Flash the way it is
supposed to be today & tomorrow: fresh
& innovative. By the way, these
Flash-examples are extremely hard or
simply impossible to build with
HTML5

Depends on what functionality you are looking for. While javascript has much evolved recently and many frameworks were introduced it cannot be compared to Flash in terms of creating rich web interfaces. I think though that progressively new concepts will be introduced like HTML5, usage of the GPU and HTML + javascript might one day fill the gap.