Currently a large amount of corporations use flash on their primary portals. However with almost all browsers improving their javascript performance, javascript is starting to become a viable option in certain situations over flash.
One company that really likes Javascript is Google. One of the primary reasons for this is the Google Web Toolkit which makes it significantly easier to write complex Javascript. The preference of Javascript by companies and Google, and the choice makes perfect sense. Firstly, Flash is a product owned by a company, where as Javascript is a native browser language that is accessible to all. Secondly, it makes more sense building stuff in a native language then Flash, since it could be reasonably justifiable that Javascript could potentially out live Flash.
However, that said, Javascript has some huge drawbacks. The first is if you’re working with Javascript, you will invariably be working with CSS, and because of this you are going to run into significant compatibility issues with rendering. With flash, with the exception of different versions, rendering is rarely, if ever, an issue. Javascript also under-performs in comparison to flash. In fact I have received messages asking me why scribblemaps is faster (in some situations) then Google Maps, and this is because I used their flash API as opposed to their Javascript API. Javascript also can’t stream media.
Flash on the other hand, while being more functional then Javascript, has some issues as well. Depending on what you’re doing, flash can really under perform, especially on lower end systems. If you use Flex, the size of your application is going to be 500kb+ for anything significant because the framework is pretty heavy, although the framework caches so clients might not have to download it on future visits to your site. Also, Flash has to be saved, exported, uploaded, embedded, where as writing Javascript can be a much simpler endeavour. The other downside of Flash is that if you are using Google Products, you can expect a lag in features for any flash implementation.
Ultimately, when deciding when to use either Javascript or Flash, you really have to evaluate what you’re going to do, and who is going to be use it. One should be wary of choosing a side though because many sites, especially media sites, will leverage both technologies in their AJAX development. But do not fret, what Flash and Javascript do share in common now is their coding syntax. Actionscript 3.0, according to a flash engineer, is 98% like Javascript, so if you learn one you can rapidly learn the other.