Notes:
|
XML
based swf, swc and abc assembler written in haXe.
(Available in as3,
haxe, neko, cpp, php, javascript, xml)
<lib>
<bitmapdata file="haxe.png" class="MyBitmapData"/>
<bitmap file="haxe.png" class="MyBitmap"/>
<sprite file="haxe.png" class="MySprite"/>
<movieclip file="haxe.png" class="MyMovieClip"/>
<button file="haxe.png" class="MySimpleButton"/>
<bytearray file="haxe.png" class="MyByteArray"/>
<sound file="chopin.mp3" class="MySound"/>
<font file="chopin.ttf" class="MyFont" glyphs="32-125"/>
</lib>
> hxswfml xml2lib library.xml library.swf
<swf>
<SetBackgroundColor color="0xFFFFFF" />
<DefineShape id="1" >
<BeginFill color="0x000000" alpha="1.0" />
<DrawRect x="0" y="0" width="100" height="100" />
</DefineShape>
<PlaceObject id="1" depth="1" />
<ShowFrame/>
</swf>
> hxswfml xml2swf index.xml index.swf
<abcfile>
<class name="Main" extends="flash.display.MovieClip" >
<var name="nr" type="int" value="100" />
<function name="Main" args="" return="void" >
<OFindPropStrict v="trace" />
<OThis/>
<OGetProp v="nr"/>
<OCallPropVoid v="trace" nargs="1" />
<ORetVoid />
</function>
</class>
</abcfile>
> hxswfml abc2swf abc.xml index.swf -main Main
<lib version="10" width="800" height="600" fps="30" backgroundcolor="0xffffff" frameCount="1" actionscript3="true" compressed="false" useDirectBlit="false" useGPU="false" hasMetaData="false" useNetWork="false" >
<!-- flash.display.BitmapData -->
<bitmapdata file="*.gif,jpg,png" link/class="MyBitmapData"/>
<!-- flash.display.Bitmap -->
<bitmap file="*.gif,jpg,png" link/class="MyBitmap"/>
<!-- flash.display.Sprite -->
<sprite file="*.gif,jpg,png" link/class="MySprite"/>
<!-- flash.display.MovieClip -->
<movieclip file="*.gif,jpg,png" link/class="MyMovieClip"/>
<!-- flash.display.SimpleButton -->
<button file="*.gif,jpg,png" link/class="MySimpleButton"/>
<!-- flash.utils.ByteArray -->
<bytearray file="*.*" link/class="MyByteArray"/>
<!-- flash.media.Sound -->
<sound file="*.mp3" link/class="MySound"/>
<!-- flash.text.Font -->
<font file="*.ttf,otf" link/class="MyFont" glyphs="32-125,200-255" name="Arial"/>
<abc file="*.swf,abc" link="MyClass" />
</lib>
<?xml version="1.0" ?>
<swf width="800" height="600" fps="30" version="10" compressed="true" frameCount="1" >
<FileAttributes actionscript3="true" useNetwork="false" useDirectBlit="false" useGPU="false" hasMetaData="false" />
<SetBackgroundColor color="0xFFFFFF" />
<ScriptLimits maxRecursionDepth="256" scriptTimeoutSeconds="15" />
<MetaData file="path/to/file/containing/rdf_metadata *.txt, *.xml" />
<DefineBitsJPEG id="?" file="path/to/file *.jpg, *.png, *.gif" />
<DefineBinaryData id="?" file="path/to/file *.any " />
<DefineSound id="?" file="path/to/file *.mp3" />
<DefineFont id="?" file="path/to/swf/containing/file *.swf, *.ttf", *.otf, charCodes="32-127" name="Arial"/>
<DefineEditText id="?" initialText="" fontID="" useOutlines="false" width="100" height="100" wordWrap="true" multiline="true" password="false" input="false" autoSize="false" selectable="false" border="false" wasStatic="false" html="false" fontClass="" fontHeight="12" textColor="0x000000" alpha="1.0" maxLength="0" align="0" leftMargin="0" rightMargin="0" indent="0" leading="0" variableName="" file="" />
<DefineShape id="?" bitmapId="?" x="0" y="0" scaleX="1.0" scaleY="1.0" rotate0="0.0" rotate1="0" repeat="false" smooth="false" />
<DefineShape id="?">
<LineStyle width="0.0" color="0x000000" alpha="1.0" pixelHinting="false" scaleMode="none/horizontal/vertical" caps="round/square)" joints="round/bevel/miter)" miterLimit="0.0" noClose="false"/>
<BeginFill color="0x000000" alpha="1.0" />
<BeginBitmapFill bitmapId="?" x="?" y="?" scaleX="?" scaleY="?" rotate0="?" rotate1="?" repeat="false" smooth="false"/>
<BeginGradientFill colors="?,?,?" alphas="?,?,?" ratios="?,?,?" x="?" y="?" scaleX="?" scaleY="?" rotate0="?" rotate1="?"/>
<MoveTo x="0.0" y="0.0" />
<LineTo x="0.0" y="0.0" />
<CurveTo cx="0.0" cy="0.0" ax="0.0" ay="0.0" />
<DrawCircle x="0.0" y="0.0" r="0.0" sections="16" />
<DrawEllipse x="0.0" y="0.0" width="0.0" height="0.0" />
<DrawRect x="0.0" y="0.0" width="0.0" height="0.0" />
<DrawRoundRect x="0.0" y="0.0" width="0.0" height="0.0" r="0.0"/>
<DrawRoundRectComplex x="0.0" y="0.0" width="0.0" height="0.0" rtl="0.0" rtr="0.0" rbl="0.0" rbr="0.0" />
<EndLine />
<EndFill />
</DefineShape>
<DefineSprite id="?" file="path/to/file/ *.flv">
<DefineSprite id="?" frameCount="1">
<PlaceObject id="?" depth="?" name="" move="false" x="0" y="0" scaleX="1.0" scaleY="1.0" rotate0="0.0" rotate1="0.0" />
<RemoveObject depth="?" />
<StartSound id="?" stop="false" loopCount="0" />
<Custom tagId="?" file="path/to/file/containing/tagbody bytes" data="?" comment=""/>
<FrameLabel name="?" anchor="false" />
<Tween depth="?" frameCount="?"></Tween>
<ShowFrame />
</DefineSprite>
<DefineButton id="?">
<ButtonState id="?" depth="?" up="true" over="false" down="false" hit="false" x="0" y="0" scaleX="1.0" scaleY="1.0" rotate0="0.0" rotate1="0.0" />
</DefineButton>
<DefineScalingGrid id="?" x="?" width="?" y="?" height="?" />
<PlaceObject id="?" depth="?" name="" move="false" x="0" y="0" scaleX="1.0" scaleY="1.0" rotate0="0.0" rotate1="0.0" />
<RemoveObject depth="?" />
<StartSound id="?" stop="false" loopCount="0" />
<FrameLabel name="?" anchor="false" />
<Custom tagId="?" file="path/to/file/containing/tagbody bytes" data="?" comment=""/>
<DefineABC (file="path/to/file/containing/abc.xml,.swf" isBoot="false")>
<ABCfile>
<import name="?"/>
<class name="?" extends="?" implements="" interface="false" sealed="false>
<var name="?" type="" value="" const="false" static="false" ns=""/>
<function name="?" args="" return="*" kind="normal/get/set" static="false" final="false" variableArgs="false" defaultParameters="" locals="" argumentsDefined="false" override="false" ns="" native="false" usesDXNS="false" newBlock="false" unused="false" debugName="" maxStack="" maxScope="">
<OThis />
<OScope />
<!-- opcodes* -->
<ORetVoid />
</function>
</class>
</ABCfile>
</DefineABC >
<SymbolClass id="?" class="?" base="" />
<Tween depth="?" frameCount="?">
<Tw prop="x/y/scaleX/scaleY/rotate0/rotate1" start="?" end="?" />
</Tween>
<ShowFrame count="1"/>
</swf>
The
purpose of this application is similar to "export in first frame" for library
assets in the Flash IDE or similar to what you would accomplish with swfmill or
the '['Embed']' tag for the Flex SDK (mxmlc).
Note:
Embedded flash
apps in google code wiki pages can behave erratically.
If you are experiencing unexpected
behaviour you can test it in this regular web page: swf lib example
application
Instructions:
Notes:
|