Time for action – Creating a library
We will use SWFMILL to create a SWF file containing all our assets.
After that, we will instruct the haXe compiler to embed this SWF file in the one it is going to produce.
Creating a library can be made quite easily with SWFMILL using a XML language to describe it. Let's have a look at an XML file that will allow us to embed one image as a clip:
<?xml version="1.0" encoding="utf-8"?> <movie width="60" height="20" framerate="20" frames="1" as3="1" version="9"> <frame> <library> <clip id="Ship" import="image/ship.jpg"/> </library> </frame> </movie>
Note that this clip will have the linkage ID as Ship
and is the image located at image/ship.jpg
(this is relative to the current working directory when we will run SWFMILL). ...
Get haXe 2 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.