Hi Armencho,

2009/11/10 armen...@gmail.com <armen...@gmail.com>:
> Thank you for replying, I was very very anxious to get a word from
> you, since I assume you know a good deal more about swfmill code and
> its implications than me.

No problem. Sorry again for being so slow. The nature of volunteer
projects is such that sometimes I have plenty of time to work on
swfmill and answer questions, and other times I lag behind.


> I hope you will take the time to read through this entire message, as
> I think it is of importance to swfmill, also because I will start
> coding as soon as I possibly can and will submit the patch, but before
> I dive into it I would like to discuss the semantics and constraints
> of a possible solution to the problem with you and whomever else this
> may concern.
>
> I have done a lot of investigation into the issue, all the way down to
> decoding the opcodes involved in setting up asset classes.

Sure, I’ll be happy to help as best I can. I really appreciate your
spending time on this. As you’ve said it is likely to be important to
many users of swfmill.


> I can tell you that it is not as simple as disregarding this as "let
> people implement classes in their compiler language instead". Consider
> f.e. fonts. Without a font class stub present in a SWF generated by
> swfmill beside the font data tag and symbol id tag, SWFs running on
> AVM2 that load this font library SWF, will *NOT* be able to even find
> the font, no matter what tricks you try!

Agreed, although even this case should not be insurmountable. Provided
swfmill generates class associations correctly, it should be possible
to compile the necessary stub into your external swf using haxe or
as3compile. Your main swf isn’t the only one that can contain code :).

However, I agree that this is not ideal, and that it would make user’s
lives much easier if they could generate the stubs using swfmill only.


> There is simply no API to do
> that, other than to locate the font class and construct the font
> object. This is the problem, not the fact that we need write own
> classes for some language. The problem pertains to ALL kind of SWF
> applications that want to load and use a font. This is why this is
> paramount.

Agreed.


> I have built a bash script that essentially combines an SWF produced
> with swfmill from a simple dialect carrying a DefineFont3 and Symbol
> tag, with another SWF produced with swfmill from an XML reverse
> ...

Don’t forget that swfmill is an XSLT processor. You should be able to
do this sort of job much more easily and reliably by writing an XSLT
stylesheet and having swfmill postprocess your XML:

swfmill simple font-data.xml font-data.swf
swfmill swf2xml font-data.swf font-data.swf.xml
swfmill xslt generate-stubs.xslt font-data.swf.xml font.swf

Many jobs can benefit from this sort of approach, although the process
is a bit clunky at the moment. I plan to improve the swfmill xslt
command so that it can accept a SWF as input (removing the need for
the second step). I also plan to merge the simple and full dialects,
removing the need for the first step.

Remember that the simple dialect itself is implemented as an XSLT
transformation, so this sort of approach can be quite powerful. Of
course, anything as generally useful as generating class stubs ought
to be integrated into the simple dialect.

> I am attaching the bash script and its dependencies that illustrate
> how to generate AVM2 compliant font (although this applies to any kind
> of asset) libraries, that actually work when loaded. This may give
> ideas to what swfmill may be missing.

Thanks for doing that. It shouldn’t be a problem to generate that code
in simple-tools.xslt as suggested in my other email. If I get a chance
I will give it a try myself tomorrow and see what happens.

Dan.

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

Reply via email to