Get the ADT application and the Flex SDK from http://opensource.adobe.com/wiki/display/flexsdk/Downloads


Open a command prompt in Windows or shell prompt in OSX

Go to directory Flex SDK\bin and run:

 

adt -package -storetype pkcs12 -keystore <your_PFX_file> -storepass password YourApp.air YourApp-app.xml YourApp.swf


<your_PFX_file> is the full path to the PFX/p12 file that contains your Code Signing Certificate

 

password is the password for your code signing certificate