Welcome to MSDN Blogs Sign in | Join | Help

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. 

Published Tuesday, November 21, 2006 9:54 AM by mswanson
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: SWF2XAML: A Tool to Convert Flash Files to XAML

Well done! I'm particularly impressed by the compound shape -> standard shape conversion.

I haven't even tried doing that myself, as I've heard a lot about how difficult it would be... All the more kudos to you! So, any chance of posting the source for that part of the program?

Tuesday, November 21, 2006 2:32 PM by Jonas Beckeman

# re: SWF2XAML: A Tool to Convert Flash Files to XAML

I'm glad you've written this, but I wonder how Adobe will feel. AFAIK it is actually contrary to the SWF specification license to implement a viewer, which I wouldn't mind seeing challenged.

Tuesday, November 21, 2006 2:57 PM by Chris Nokleberg

# SWF to XAML converter released by Michael Swanson

Michael Swanson has released a free converter to take SWF to XAML converter. "Finally! After months of

Tuesday, November 21, 2006 3:23 PM by Mark Johnston's Developer Experiences

# SWF2XAML

SWF2XAML: An Adobe/Macromedia Flash to XAML Conversion Tool Adobe FlushのファイルをXAMLにトランスレ

Tuesday, November 21, 2006 4:46 PM by OPC Diary

# SWF2XAML-AF2XAMLCT

Cryptic!! but for those in the industry they'll recognize it straightaway. Thanks to Mike Swanson, a

Tuesday, November 21, 2006 4:58 PM by Backstage at MED

# Convert SWF to XAML

Just in case you haven't read about this on all the other blogs: Michael Swanson , a Technical Evangelist

Tuesday, November 21, 2006 5:14 PM by Gabriel Lozano-Morán - The .NET Aficionado

# re: SWF2XAML: A Tool to Convert Flash Files to XAML

Incredible work! "Relatively useful"? A kind of understatement I haven't heard in a long time.

A call from Adobe lawyers coming in 3..2..1..

Tuesday, November 21, 2006 5:33 PM by Maciej Rutkowski

# Flash (SWF) to XAML converter

Mike Swanson has created a Flash (.SWF) to XAML conversion tool called SWF2XAML . Great stuff! KarstenJ

Tuesday, November 21, 2006 5:47 PM by Robert Burke's Weblog

# [WPF] Un convertisseur Flash (SWF) vers XAML !

Vous en réviez ? Michael Swanson l'a fait ! SWF2XAML est un outil qui va convertir les fichiers Flash

Tuesday, November 21, 2006 6:12 PM by Thomas Lebrun

# How to convert flash files to XAML

If you have been playing with Sparkle and wanted a way to bring in Flash files in XAML then today is

Tuesday, November 21, 2006 10:35 PM by Ozzie Rules Blogging

# re: SWF2XAML: A Tool to Convert Flash Files to XAML

Chris & macbirdie: When I started my proof of concept work months ago, the first thing I looked for was the official Adobe/Macromedia Flash file specification. Unfortunately, the license to download and view the file format documentation was too restrictive for my needs. The good news is that there are a lot of public posts, forums, and articles from people who have had similar needs. Although the public information is not always 100% correct, it is enough to get pretty far with an implementation (as witnessed by the SWF2XAML tool).

Wednesday, November 22, 2006 1:53 AM by mswanson

# SWFをXAMLに変換するツール登場

Wednesday, November 22, 2006 4:41 AM by Software

# SWF to XAML Converter

Wednesday, November 22, 2006 6:56 AM by Stanley Tan's Blog

# The WPF Conversion contest. Part II

A month ago I blogged about the WPF conversion contest. The blog discussed creating a tool which converts...

Friday, November 24, 2006 8:04 AM by Hristo Kosev

# SWF to XAML Converter

Friday, December 22, 2006 5:11 AM by ChewyTest

# Conversão de Flash/SWF para WPF

Na maioria das palestras que faço a respeito de WPF a primeira pergunta é; existe uma ferramenta de converão

Friday, February 09, 2007 2:16 PM by Good News and No News

# 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

Wednesday, March 14, 2007 11:36 PM by Mike Swanson's Blog

# A Quick Tour of SWF2XAML

In this screencast, I give a quick tour of SWF2XAML, a tool that helps convert Adobe/Macromedia Flash/SWF files to XAML for use with the Windows Presentation Foundation.

Wednesday, June 13, 2007 11:02 PM by TrackBack

# re: SWF2XAML: A Tool to Convert Flash Files to XAML

excellent! When you launch the xaml, make sure that you launch IE. Had Firefox as my default browser and had to reboot my system to get the tabs to stop coming up.

Friday, June 29, 2007 11:52 AM by nomadny

# re: SWF2XAML: A Tool to Convert Flash Files to XAML

Great Job!!! Hi, Im from Ecuador, South America, i've been working on a flash content for my web, well this great tool will help me to pass from flash to xaml and then publish it  with php, great!!!

Thursday, February 14, 2008 8:03 PM by x1814n

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker