Archive for the ‘air’ Category

No custom headers for FileReference.upload. Why?

19 March 2008 | filed under actionscript, air, flash | 10 comments »

ActionScript iconI got excited when I learned that YouTube opened their API for third party developers. This would enable me to - for example - create a nifty AIR widget to quickly upload videos to my YouTube account. Drag-and-drop a video file onto the AIR app and have the uploading done in the background. Cool!

So I took off, did the authentication stuff with the ClientLogin API so I was able to login into my YouTube account with Flash.

Next: add uploading functionality. Again, the docs are clear and I’m halfway done when I re-read the URLRequest.requestHeaders documentation, only to find out that custom headers (required for the YouTube upload to succeed) are not supported by FileReference.upload!

So much for my YouTube upload AIR widget…

Adobe, PLEASE consider removing this restriction from a future Flash player. Or please tell me why this restriction is imposed on the upload method, as I fail to see why we shouldn’t be allowed to create our own POST request headers for the upload method.

Building AIR with FDT

27 January 2008 | filed under actionscript, air, software | 1 comment »

It’s been a while, but I had some spare moments lately to testdrive both FDT and the latest beta of AIR.

The cool thing about FDT is that it enables you to develop, test and package AIR applications straight from the Eclipse IDE. This process is explained in detail on the Powerflasher site. However, the Ant build script provided there does not work with the latest version of the Flex 3 SDK.

AIR Build file for FDT

I corrected the XML build file and tried to post the corrections on the Powerflasher site. Unfortunately, their CMS filters comments quite rigorously, so my corrections never actually appeared there.

So, if you are interested in developing AIR with FDT, first follow the instructions on the Powerflasher blog and then use this Build_AIR.xml file for testing and packaging your project. Enjoy!

Please make sure you double check he SDK path properties in the XML file and the certificate properties you wish to use. For instance, I work on a Mac, so, if you work on Windows, make sure you add .exe to the name of the Air debug launcher:

<property name="adl" value="${sdk_dir}/bin/adl" />

into

<property name="adl" value="${sdk_dir}/bin/adl.exe" />