SWF2XAML 0.2: A Slightly Better Flash to XAML Conversion

SWF2XAML 0.2: A Slightly Better Flash to XAML Conversion

  • Comments 5

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.

Leave a Comment
  • Please add 3 and 1 and type the answer here:
  • Post
  • Mike, why only one way - something to XAML?

    How can I get out of XAML to something like avi or wmf. Is it possible to compile XAML to a movie for DVD?

  • During the weekend I spent some minutes to collect some of the greatest Silverlight examples. Most of

  • Still, I have this problem. Can't use your tool. I am using (well, trying to use) version 0.2.

    See the end of this message for details on invoking

    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************

    System.FormatException: Input string was not in a correct format.

      at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

  • Jefim...I thought I had fixed this bug, but I've heard a couple reports that I haven't. To get around the issue for now, change your number format in Windows to US English. Of course, you can change it back after the conversion.

  • had the same problem Jefim reported, but the fix helped: "change your number format in Windows to US English". Would be nice to fix it in the upcoming releases.

    Mike, thanks for the free utility!

Page 1 of 1 (5 items)