As if this thread wasn't long enough already... I finally figured everything
out. So... to anyone else who is ever having this problem, here's what you
do:

I first recommend building swfmill from source by doing a checkout from
subversion. I built mine on Ubuntu 6.06 and other than dependency issues,
had no real problems. Now for the fun part. In my case, when I was compiling
the following foo.xml:

<?xml version="1.0" encoding="iso-8859-1" ?>
> <movie version="9" frames="2">
>         <background color="#FFFFFF"/>
>         <frame>
>                 <library>
>                         <clip id="foo" import="foo.png"/>
>                 </library>
>                 <place id="foo" depth="1"/>
>         </frame>
>         <frame>
>                 <library>
>                         <clip id="bar" import="bar.png"/>
>                 </library>
>                 <place id="bar" depth="1"/>
>         </frame>
> </movie>
>

with the following command: $ swfmill simple foo.xml foo.swf. Now, if you
try to load this into Flex (either directly or with a Loader object), Flex
thinks that foo.swf is running AVM1. This means that the output swf is most
likely Flash 9, but AS2. After decompiling several sources and going through
their xml, I found this one line that was added into a Flash 9/AS3 swf
produced by Flash CS3 that was NOT in the swf produced by swfmill:

<FileAttributes hasMetaData="0" allowABC="1" suppressCrossDomainCaching="0"
> swfRelativeURLs="0" useNetwork="0"/>
>

In my case, it always was the first tag to be declared in the <tags/> tag
(of the xml generated from swf2xml). So, what I ended up doing, was
compiling my simple xml into a swf file, decompiling that swf file using
swf2xml into a new xml file, inserting this line where it belongs, and
recompiling again using xml2swf. This new swf will now be read by Flex as
AS3 and you can access the frames as you would any other FP9/AS3 file.

So, my question is... what exactly is this line and what does it do? Is
there any way to get this line inserted into the swf the first time I run
swfmill simple? What I'm doing now works... but I have to compile,
decompile, insert line of code, recompile again. It would be nice if I
didn't have to compile twice.

Either way, I'm just glad that I got everything working :)

-- Joel
_______________________________________________
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Reply via email to