I personally prefer lightweight javascript over the often slower flash equivalent. Rich UI functionality is generally easier to implement in flash though. But this can be a heated debate so watch out..
Some things to consider: The iPhone supports javascript but not flash, Adobe does not have flash out for x86_64 Linux, Flash is a proprietary closed platform.
The basic file size of an empty swf file is approximately 35 bytes.Apart from this 35 bytes, everything else is developer contribution. The file size depends on what kind of assets you want to embed in your flash widget. If you embed more images,mp3s etc., the file size will increase. One of the greatest strengths of flash is the speed at which the 'flash virtual machine' initializes. A swf file churned out by a good developer will perform well.
Having said that i would personally prefer to go with a javascript version, if the widget doesnt require video or hardcore visual effects.Why lock yourself in a closed piece of software unless its acutely necessary ?
A major disadvantage of using flash is that, flash by default will place itself on top of everything else in a webpage. A work around for this is to set wmode as "transparent". But this will drastically reduce performance of flash widget in Gecko browsers.And hence, as far as possible, use javascript.
It's true that the Flash VM is quite fast itself, at parsing, rendering, etc. But Flash feels much more sluggish for most things. Try any largish interface in Flash to see for yourself. Imagine Gmail in Flash, it would be much less snappy. Flash is an entirely different platform inside your browser with all its own facilities. Javascript can be used in a lightweight way on top of the native HTML/image/CSS stuff your browser is so good at.
Keep hearing the same 'closed software' regarding flash and I don't understand why. There are quite a few open source platforms that produce swfs (open laszlo, aptana, even flex is open source now). Regarding the flash player, it is not any more closed software than IE is.
Also isn't it nice not to have to write javascript code for each browser that exists out there?
You are right. One of the greatest advantages of Flash is that, you need to code only once, and you can deploy the swf wherever Adobe's flash player works.But thats the catch! The format's license do not allow the creation of software that could 'play' SWF files. The license only allows the creation of software that could 'create' swf files. Aptana, Openlaszlo are all development environments that could 'create' SWF.
In short, Adobe doesn't want anyone to mess up with the Flash Player.As you may already know, Gnash is an open source movement in this direction.
What if Netscape said only Netscape's browser could handle javascript although you could write the script in emacs or notepad or whatever .. ?
As a widget usually requires only very little coding, its worth coding it in Javascript ,if it isnt too Rich with animation,video or audio.When it comes to these rich factors, there is no question that flash is the best choice.
Flash 9 is considerably faster than previous flash versions at most tasks, and is indeed faster than javascript for the most part too. Doesnt paint the whole picture, but at least gives an idea.
Pretty much everyone has JavaScript. While for what you are doing, probably everyone in your target audience has Flash, but keep in mind for different versions the % of the general population that has it installed is not 100%: http://www.adobe.com/products/player_census/flashplayer/vers...
Adobe (who has an incentive to inflate their numbers though I'm not saying they are) puts Flash 9 at 84.0%. Below that you get into the high 90s. But if your whole product is based on a viral loop, and you can achieve the same thing with JavaScript, that few % can be important when compounded over time.
Play to the particular technology's strengths... flash for video or performance and javascript for flash-disabled clients or working closely with the DOM
Some things to consider: The iPhone supports javascript but not flash, Adobe does not have flash out for x86_64 Linux, Flash is a proprietary closed platform.