Cp-s05box Wiki
Advertisement

SWiX is a program that converts SWF files to XML files, and allow editing and saving them in this format.

Notices[]

  • Its Undo and Redo buttons don't always work properly after pasting content. It's recommended to copy the entire file to a text editor that highlights the XML markup for an easier editing, and then pasting what you are left with into SWiX and save.
  • Saving may not work properly without using the play button first (File -> Play, or Ctrl+Enter). Ever since the discontinuation of Flash support, SWiX's play function no longer works properly. Therefore, using SwiXConsole may be used as an alternative.

SwiXConsole[]

You can also use your command line to use SWiX, both for converting to and from XML:

This requires either opening your command line/PowerShell, or interacting with SwiXConsole.exe using some programming language. The main advantage in this is that your conversion will happen in seconds, and you are very unlikely to run into frozen-screen issues when waiting for SWiX's GUI to render the highlighted XML.

Command line[]

<#
	first, navigate to the folder on which SWiX is isntalled
	or replace 'SwiXConsole' with the path to of the exe file

	the output file will be the same as the input
	(but the file type will match the output format, e.g. .swf -> .xml)
#>

# next line will take 'foo.swf' as the input, and convert it to 'foo.xml'
SwiXConsole -i foo.swf

# next line will take 'foo.xml' as the input, and convert it to 'foo.swf'
SwiXConsole -i foo.xml

You can also specify a wanted output file name, if you like:

# convert 'foo.swf' to 'bar.xml'
SwiXConsole -i foo.swf -o bar.xml

# convert 'foo.xml' to 'bar.swf'
SwiXConsole -i foo.xml -o bar.swf

PowerShell[]

# convert 'foo.swf' to 'bar.xml'
.\SwiXConsole swf2xml foo.swf bar.xml

# convert 'foo.xml' to 'bar.swf'
.\SwiXConsole xml2swf foo.xml bar.swf
Advertisement