I was talking to Max about some strategies for compiling multiframe swf
assets for swf9.

The issue is that while the swf9 compiler provides a way to embed symbols or
movies into
an app, it does not provide a way, that I know of, to combine separate swf
resources into multi-frame movies,
in the manner that we do with the resource tag using jgenerator, e.g.,


    <resource name="lzcheckbox_rsrc">
        <frame src="resources/checkbox/checkbox_off.swf" />
        <frame src="resources/checkbox/checkbox_off_mo.swf" />
        <frame src="resources/checkbox/checkbox_on.swf" />
        <frame src="resources/checkbox/checkbox_disable_off.swf" />
        <frame src="resources/checkbox/checkbox_on.swf" />
        <frame src="resources/checkbox/checkbox_on_mo.swf" />
        <frame src="resources/checkbox/checkbox_off.swf" />
        <frame src="resources/checkbox/checkbox_disable_on.swf" />
    </resource>

These are compiled by SWFWriter.importResource into a single movieclip with
multiple frames.

Since there doesn't seem to be any Flex compiler special form for doing this
(at least not
in Actionscript 3, maybe there is in mxml?), we thought of an interim
solution which would be to
take all the multiframe resources in the lzx app, and run them through
importResource to
build a temporary swf file which contains just resources, and then supply
that as the source
for the flex Embed pragma:

[Embed(source="tmp.swf", symbol='lzcheckbox_rsrc')]

This will let us build multiframe resources, but only using  swf8 and
earlier assets, since I am
assuming the our jGenerator library cannot parse assets out of swf9 files
(can it?).

Going forward, the Flex SDK compiler source code is available, so if there
is no as3 or mxml way
to do what we want, we can presumably
roll our own entry points to parse and compose multiframe swf9 assets. But
using the old jgenerator code
and emitting a temporary swf file seems like the most expedient way to
provide back
compatibility at the moment.

There actually  was some cryptic note at this blog
http://blogs.adobe.com/rgonzalez/2006/06/
about a [Frame(...)] compiler special form in as3 , but I havent tried to
track that down yet to see
if it really exists or would be useful.








-- 
Henry Minsky
Software Architect
[EMAIL PROTECTED]

Reply via email to