Saturday, March 15, 2008

Setting a default application for Flex SWF files on Mac


I found a small problem with opening SWF files on Mac. I am using Mac OS X Tiger version at the moment. I installed Flex SDK 3 and created a sample project in Eclipse with an Ant build file that compiles my Flex msml code to SWF files. I've noticed that generated SWF files are associated with RealPlayer, however it does not really play them.






I can select these files in Firefox just fine. But, the bigger problem is when I use a command line Flex debugging tool called fdb. It opens the RealPlayer for me, and I cannot really choose a player in the fdb tool.




Adobe fdb (Flash Player Debugger) [build 814]
Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.
(fdb)
(fdb) run file:///Users/mykola/progs/workspace2/fx_practice3/build/fx_practice3.swf
Attempting to launch and connect to Player using URL
file:///Users/mykola/progs/workspace2/fx_practice3/build/fx_practice3.swf



Here is how to fix it.

  1. Open Finder and locate the file with swf extension.
  2. Right click and select Get Info.
  3. In the Get Info dialog, select Open with: Other ...
  4. In the Choose Other Application dialog, set Enable: All Applications and select Firefox or other application you like to play SWF files.
  5. Click Add. The selected application will be displayed in the Get Info dialog.
  6. The last step is click on Change All... to set this player application for all SWF files.
Done! :)