[swfmill] SWFMill with as3 and flash 9

Tony Polinelli tonyp at touchmypixel.com
Mon May 26 00:24:24 PDT 2008


I've been trying to combine some swf libraries into a single swf using
swfmll. Currently my file looks like:

<?xml version="1.0" encoding="iso-8859-1"?>
<movie as3="1" version="9" width="320" height="240" framerate="12" >
    <background color="#ffffff"/>

    <frame>
        <library>
            <clip id="cla" import="1.swf" />
            <clip import="2.swf" />
        </library>
        <place id="cla" name="myFoobar" x="10" y="10" depth="1"/>
    </frame>
</movie>

I dont really want to access the items by their id (even tho i cant get that
to work either), but for it to retain the linkages of the clips which are in
each library (1.swf and 2.swf). When i do this i create a file, which in
FlashDevelop, i can see all of the classes - in this case Box, Square,
Circle, Etc.

So, Can i access the clips in swfmill in as3? The classes dont seem to
exist- for the i'd ones (eg. cla in this example) or the ones in the libs.
my code is as follows:

        public function Test()
        {
            loads = new Loader();
            loads.contentLoaderInfo.addEventListener(Event.COMPLETE, doit);
            loads.load(new URLRequest("lib.swf"));
            addChild(loads);
        }

        function doit(...e)
        {

            var c =
loads.contentLoaderInfo.applicationDomain.hasDefinition("Box");
            trace("CLASS EXISTS GLOBAL: " + c);
            trace("CLASS EXISTS AT ALL: " +
ApplicationDomain.currentDomain.hasDefinition("Box"))
            /*var b = new (getDefinitionByName("Box"))();
            addChild(b);*/
        }

i have attached some files of my tests, this would be great if you could
help.



-- 
--
Tony Polinelli
http://www.touchmypixel.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swfmill_osflash.org/attachments/20080526/e33cfcc6/attachment.html 


More information about the swfmill mailing list