[swfmill] Splitting simple dialect in several files

Gabino Travassos gabino at moteinteractive.com
Fri Apr 11 07:18:12 PDT 2008


I'm just guessing here, but I think the import tag needs a referrer name.

Here's an XML file I made that has a jpeg and mp3 embedded in it:

<?xml version="1.0" encoding="UTF-8" ?>

<movie version="8" width="800" height="600" framerate="30">

<background color="#fcfcfc" />

<library>

<clip id="img1" import="images/784I.jpg" />

<clip id ="fallout" import="the_fallout_PunkIsDead.mp3" />

</library>

<frame>

<place id="fallout" /><place id="file1" />

</frame>

</movie>

I get SWFMill to export and swf from this: swfmill simple file.xml file.swf
in my .hx file I am referring to it:
var fallout=new Sound(null);

fallout.attachSound("fallout"); // this is the id from the xml file

fallout.start();


And my .hx file needs this at the top:
import flash.Sound;



----- Original Message ----- 
From: "Michael Pliskin" <pl at tepkom.ru>
To: "Ralf Fuest" <ralf-fuest at gmx.de>
Cc: <swfmill at osflash.org>
Sent: Friday, April 11, 2008 8:05 AM
Subject: Re: [swfmill] Splitting simple dialect in several files


> Hello Ralf,
>
>  I've finally managed to try the function of splitting an xml into
>  pieces I asked you to implement several months ago, and found a
>  problem: I can easily compile an swf from pieces but the resources
>  are not available.
>
>  The xmls look like:
>
>  root.xml
> <movie version="8">
>  <frame>
>     <library>
>        <include file="inc.xml" />
>    </library>
>  </frame>
> </movie>
>
>  and inc.xml
> <movie version="8">
>  <frame>
>     <library>
>        <clip import="file.swf" />
>    </library>
>  </frame>
> </movie>
>
>  this compiles but no resources available then. Maybe I am using that
>  in a wrong way somehow?
>
> Mike
>
> Sunday, October 7, 2007, 9:54:31 PM, you wrote:
>
> RF> Hello Michael,
> RF> the function you described didn't exist in swfmill. But I think it is 
> a
> RF> useful feature, so I implemented it and now the svn version supports
> RF> this feature.
> RF> The syntax is equal to your proposal. The included files need to have
> RF> the same format as any other swfml simple file. All tags inside the 
> root
> RF> movie tag are include. The attributes of the movie tag in the included
> RF> files are ignored.
>
> RF> Ralf
>
>>>   I am sorry if this is a newbie question, but I didn't find anything
>>>   on the net yet. Is there a way to split a simple dialect XML file
>>>   into several ones? I'd like to have something like include
>>>   functionality, so you can write it like
>>>     <include file="another.xml" />
>>>   and another.xml would be processed as a part of main file.
>>>
>>>   The reason for this is easy support for different themes in my
>>>   application: I'd like some resources to be theme-specific and others
>>>   to be shared.
>
>
>
>
> -- 
> Best regards,
> Michael                            mailto:pl at tepkom.ru
>
>
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
> 





More information about the swfmill mailing list