[swfmill] Accessing swfmlill library assets (png, mp3) from Flex/as3
armencho at gmail.com
armencho at gmail.com
Fri Nov 6 04:54:06 PST 2009
Yes, now I posted a followup message to the list, hoping to find out
whether the situation can be resolved using only swfmill.
There are always more tools of course, but I like to keep it 'simple'
(pun intended) :-)
I have big faith in swfmill, and I think it can be done, I just don't
know the 'non-simple' XML dialect well enough...
2009/11/6 Jonas Nyström <jonasnys at gmail.com>:
> Thank you; Armencho, for your generous work on this case!
>
> There's a solution called hXswfML (http://code.google.com/p/hxswfml/) that
> seems to generate swfs with class stubs. Unfortunately they don't seem to
> load properly in Flex.
>
> SamHaxe is the next step to try, I suppose.
>
> J
>
> Den 6 november 2009 12.12 skrev armencho at gmail.com <armencho at gmail.com>:
>>
>> Ok, I have spent a couple of hours on this, and fount out the following.
>>
>> In order to instantiate classes (which include images for new virtual
>> machine) dynamically (using ApplicationDomain::getDefinition or
>> flash.utils.getDefinitionByName) your child/library SWF not only has
>> to containe the assets, as described by your swfmill source xml, but
>> also has to actually export what is known as "class stubs". These are
>> descriptions of classes that are bound to the image data. The bitmap
>> you are defining for example is expected to be linked to a class
>> extending a BitmapData.
>>
>> The problem is, swfmill does not automatically generate these class
>> stubs for you, when you compile swfs from your xmls.
>>
>> The full swfmill format specification may allow for writing these
>> class stubs manually though, but I have not been able to write them
>> myself, because that would require some indepth knowledge of the SWF
>> format, which I do not have, not to the required degree anyway.
>>
>> Basically, your library SWF does include the image, but since it does
>> not include information on the class you are tring to find with
>> getDefinition, it cannot find the class :-)
>>
>> You can try a tool called SamHaxe which is a direct alternative to
>> swfmill, and promises more things, and I have read that it generates
>> class stubs automatically.
>>
>> Maybe Daniel can elaborate on this issue, as to if it is feasable to
>> use swfmill for the purpose, and what is the best way to do this?
>>
>> 2009/11/6 Jonas Nyström <jonasnys at gmail.com>:
>> > Hi Armencho!
>> >
>> > The xml is just as described, nothing more:
>> >
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <movie version="10">
>> > <frame>
>> > <library>
>> > <bitmap id="library.TestBitmap" import="assets/test.png"/>
>> > </library>
>> > </frame>
>> > </movie>
>> >
>> > The command line just plain
>> >>swfmill simple test.xml SMLibrary.swf
>> >
>> >
>> >
>> >
>> >
>
>
>
> --
> Med vänlig hälsning!
>
> Jonas Nyström
> jonasnys at gmail.com
> 070-670 36 50
>
More information about the swfmill
mailing list