[swfmill] SWFMill with as3 and flash 9
Joel Poloney
jpoloney at gmail.com
Mon May 26 00:37:37 PDT 2008
Tony,
This is something that I was dealing with a while back:
http://osflash.org/pipermail/swfmill_osflash.org/2007-November/001540.html.
The thread is actually pretty huge, but worth reading.
If you want your swf to work in AS3, you should begin your xml file as
follows:
<?xml version='1.0' encoding='iso-8859-1' ?>
<movie version='9' frames='5' width='320' height='240'>
<FileAttributes hasMetaData='0' allowABC='1'
suppressCrossDomainCaching='0' swfRelativeURLs='0' useNetwork='0'/>
<background color='#FFFFFF'/>
...
</movie>
Also, the latest binaries from the swfmill website (0.2.12) do not support
the FileAttributes tag (at least not very well, someone correct me on
this?). If you compile from source, it should work fine. I've compiled from
source (specifically revision 234) and I have no problems with this. The
latest revision appears to be 250 (version 0.2.12.6).
Cheers,
-- Joel
On Mon, May 26, 2008 at 12:24 AM, Tony Polinelli <tonyp at touchmypixel.com>
wrote:
>
> 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
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swfmill_osflash.org/attachments/20080526/44528021/attachment.html
More information about the swfmill
mailing list