Sample: SWF2XML.vbs - decompiling SWF to XML with SWF Scout SDK

Submitted by eLenka on 21 April, 2011 - 15:03

The sample shows converting SWF into XML file. SWF is decompiled to XML using SWF2XML object interface of SWF Scout library.

IMPORTANT NOTE: to use SWF2XML and XML2SWF objects you should have Expert Edition of the SDK.

For backward compilation see also: How to compile SWF from XML using XML2SWF object

VB Source Code:

Set SWF2XML = CreateObject("SWFScout.SWF2XML")
 
SWF2XML.InitLibrary "demo","demo"
 
SWF2XML.LoadSWFFromFile "Shapes.swf"
SWF2XML.SaveToFile "Shapes.xml"

Produced XML code:

<?xml version="1.0" encoding="UTF-8"?>
<SWF XMax="12800" YMax="9600" FPS="12" Version="6" SystemCoord="Twips" Compressed="True">
  <SetBackgroundColor Color="#FFFFFF"/>
  <DefineFont2 ID="1" Name="Arial" SmallText="True" ShiftJIS="False" ANSI="True" Italic="False" Bold="True" WideCodes="True" LanguageCode="0">
    <Glyph Num="0" Code="32">
      <MoveTo Line="0" Fill1="1"/>

 

Download attached file to view full XML code: