Mike Swanson

November, 2006

  • Mike Swanson's Blog

    SWF2XAML: A Tool to Convert Flash Files to XAML


    Finally! After months of tinkering around in my spare time, I've managed to assemble a relatively useful tool called SWF2XAML. The first version of this tool allows you to open a Flash/SWF file and advance through the frames one-by-one. When you've found a frame that you like, you can easily export it to a file or copy its XAML to the clipboard. Import or paste the XAML into your tool of choice, and off you go.

    Now, before you start converting files, let me set your expectations. Flash files contain a lot of information, including shape definitions, animations, and code in the form of ActionScript. The version of SWF2XAML I'm releasing today only converts shapes on a frame-by-frame basis. In other words, there is no conversion to native WPF animations, and there is certainly no code conversion. Both of these are possible, and they'd require a lot more work.

    If you'd like to know more about the technical details, Karsten Januszewski, a fellow Technical Evangelist, filmed a short Channel 9 interview that provides insight into the structure of a SWF file, what is currently converted, and the general algorithm used to bring shapes into WPF. Plus, there is a very quick walkthough and demo at the beginning of the video.

    I've written two blog posts about some of my earlier experimentation: Converting Flash Shapes to WPF, and Example C# Code for Reading Flash (SWF) Files. If you plan to write your own utility, these should be very useful.

    I'd love your feedback! Is this tool useful? What other features would you like to see supported? Would anyone really want to convert ActionScript to something like C#?

    Update: I just posted a 11½ minute screencast that gives a quick walk-through of the tool. 

  • Mike Swanson's Blog

    More WPF Conversion Tools, Including VB6 to XAML


    I wish I still had a copy of VB6 installed to try this one out (seems like it's been forever since I've fired up VB6). I received an e-mail from "Davide" pointing me to his VB6 to XAML conversion tool. I can't read Italian (here's the Babel Fish translation in broken English), but I like what I see in the screenshot. Anyone out there with VB6 who can give us a first-hand account of its effectiveness? Cool stuff, Davide.

    I've been remiss in blogging about Thomas Goddard's Maya to XAML conversion tool, but he's now submitted it to CodePlex! Yes, that means that you can download the source code and see how he pulls off his magic. Thomas has spent over a year building a lot of professional-level features into this plug-in, and in my opinion, it's one of the best conversion tools out there. There's even an issue posted that's near and dear to my heart: quaternion rotation. Okay, it isn't really "near and dear," but the term sounds impressive, and I've read enough about quaternions to feel guilty that I still don't grok the concepts. Oh well. Regardless of my inadequacies, great job Thomas! I'm off to 7-11 to grab a SLERPie.

    Takeshi Onishi built a tool called Cyberdelia that allows you to create 3D animations and export them to XAML. The page is in Japanese, so if you're like me, you might need to try the Babel Fish translation. It'll be interesting to see where this one goes.

    Here are some other conversion tools for WPF that you might find useful (the first three of these are winners in the recent WPF Conversion Tool contest). I'll be adding these to my WPF Tools and Controls page shortly:

    1. Jonas Beckeman's PSD to XAML Converter
    2. Andrej Benedik's Viewer3ds
    3. Fred Vandervelde's DWG/DXF to XAML Conversion Toolkit (D2X)
    4. Amr Khedr's OBJ to Xaml Converter and DXF to Xaml Converter
    5. Serkan Kesgin's SXConverter

    Any that I've missed? If so, let me know, and I'll be sure to add them.

    Oh...almost forgot. Lee (over on theWPFblog), posted a very interesting SWF2XAML Side-by-Side Comparison showing an animation in both Flash and XAML. Nice work, Lee!

  • Mike Swanson's Blog

    .NET Framework 3.0 and SDK Final Versions Released


    Yes, it's true. The final, RTM version of the .NET Framework 3.0 and associated SDK were released today. And there was much rejoicing!

    If you have earlier versions of these packages installed on your machine, be sure to read and follow the uninstall instructions.

Page 1 of 1 (3 items)