Friday, January 18, 2008

Flex 3 (Beta 3) Badge.swf don't like spaces!

We just recently were challenged with trying to update to the latest Flex beta, and there have been a few changes to the way the seamless install badge.swf works. For one thing, this program now goes out and talks to an air.swf hosted by Adobe. The second, and far more annoying "feature" was that if you had an AIR file name like "Sample Application.air" and tried to publish that using the sample batch.swf provided in the SDK, the AIR Installer would fail, choking on the space.

I've hacked the badge.fla file using regex to put replace spaces with %20, and this seems to have fixed the problem for now. I also downloaded a copy of the air.swf from the Adobe site, threw it in the same folder as my badge.swf and changed the code to use that one instead.

You can get the whole bag of goodies here. I've included all the source and a ready to use badge.swf, as well as a working sample.


Ranreply said...

Where have a intranet site based flex + AIR application . As per the docs the AIR.swf is hosted in Adobe site .
Is it legal to download AIR.swf to your site ?

How did u download to your site ?

Victor Rubba said...

Not sure about the legalities... I'm just a developer. We just traced the http traffic using ServiceCapture and grabbed the file that way.