SWF2XAML 0.2: A Slightly Better Flash to XAML Conversion

Now you know why I don't write headlines professionally. After all, who (other than me) would ever use the phrase "slightly better" to engage their readers? :-)

Anyway, I've released version 0.2 of my freely available SWF2XAML conversion tool (more in a prior blog post). This updated version fixes some bugs and adds a few small features:

  • New feature: Added Edit/Preferences.../XAML/Format XAML for WPF/E. This setting modifies the XAML namespace to be compliant with WPF/E.
  • New feature: Added File/Explore Project Folder. This menu item makes it easy to browse the project folder where any exported assets like bitmaps and XAML reside.
  • New feature: Edit/Copy Resource Dictionary. This menu item copies a XAML ResourceDictionary element that represents the shapes that have been defined up to the current frame.
  • Revised feature: Exported XAML is now named frame####.xaml.
  • Fixed bug: Named objects in the SWF file were incorrectly converted if they contained spaces. Internal spaces are now replaced with an underscore (so "Play Button" now becomes "Play_Button").
  • Fixed bug: Non-repeating bitmap fills were incorrectly translated (see yellow/orange background bitmap in the two screenshots). This has been corrected.
  • Fixed bug: "System.FormatException: Input string was not in a correct format." Turns out, my US-centric brain neglected to recall the importance of passing an IFormatProvider to String.Format to ensure that my numbers were correctly formatted. This has been fixed.

More than a few people have sent me SWF files that don't display with 100% fidelity. In some cases, this is because of the way shape conversion is handled. In most of the cases, however, it's because the SWF file was published with a newer version of Flash. If you are missing certain shapes, I'd recommend opening your original FLA file and re-publishing it to a lower version (like Flash Player 6 or below). You can find this under File/Publish Settings... on the Flash tab under the Version drop-down.

There's still no support for animation, although one can imagine that as a next logical step. As always, feedback is encouraged and welcome.