You can find many frameworks or libraries, plateform dependant, that help you writing your applications. You can, for exemple, find UI components, motion tweens libraries for flash (like caurinaTweener) and for JavaScript (like JavaScript Motion Tween). Each plateform is different and each library has its own API, that you have to learn and sometimes it's the best way to give you reason for hanging .
Of course you can write your own libraries that use the same API for the different plateforms you target, but as everyone should know, coders are lazy.
haXe targets Flash and JavaScript, and thanks to the conditional compilation, you can easily build libraries having the same API and behaviour on different plateforms and sharing same, common source code.
Here comes an little example of a Button component having the same appearence and behaviour on Flash9 and JavaScript. 70% of the source code is common for both plateforms... Less time spent on building and debugging our library. It's a great news since time is money, and we don't want to loose money, right?

This is a little package that I wanted to create including some tweens, sine loops effects (will come soon) and others effects that change values in time.
For now, a Tween class and easing equations (ported to haXe), are available for flash8, Flash9 and JavaScript.
Here is a sample :Chips :