mxmlc which is the flex compiler requires that you have Java Runtime Environment installed in you system which in particular must be 32 bit (at present). The error "Error Loading: D:\Program Files\Java\jre6\bin\server\jvm.dll" is shown means you are having a 64 bit JRE. You need to point to a 32 bit version.

Open the Environment Variable window and create a new variable called JAVA_HOME with value pointing to the 32 bit version of JRE. In my case its D:\Program Files (x86)\Java\jre1.6.0_07\. Now mxmlc should work.