[swfmill] Splitting simple dialect in several files
Maxim Prokoshin
mmxer at tercom.ru
Mon Apr 14 09:05:29 PDT 2008
Thank you, but it still doesn't work for us.
I tested it. We can't access embedded images (from haXe) while they are included to swf in this way with <include/>.
Flash player error: Variable (clip id) is not defined.
-----Original Message-----
From: swfmill-bounces at osflash.org [mailto:swfmill-bounces at osflash.org] On Behalf Of Ralf Fuest
Sent: Saturday, April 12, 2008 7:04 PM
To: swfmill at osflash.org
Subject: Re: [swfmill] Splitting simple dialect in several files
If I remember correctly the include tag simply copies all tags inside
the movie tag of the included file to the position of the include tag.
So you will need to change your files to:
root.xml:
<movie version="8">
<frame>
<library>
<include file="inc.xml" />
</library>
</frame>
</movie>
inc.xml:
<movie>
<clip import="file.swf" />
</movie>
or alternatively:
root.xml:
<movie version="8">
<include file="inc.xml" />
</movie>
inc.xml:
<movie>
<frame>
<library>
<clip import="file.swf" />
</library>
</frame>
</movie>
I haven't tested this, but I think it should work this way.
Ralf
> <library>
> <clip id="introslide" import="swf/introslide.swf"/>
> <clip id="bluebox" import="swf/bluebox.swf"/>
> <font id="Franklin Gothic Medium" import="fonts/framd.ttf"/>
>
> Okay, how about several steps where each XML piece is compiled to swf and
> imported into another main XML, which is then used in haXe? Or is this what
> you're doing already?
>
> How are you making your XML? Maybe the reusability has to be before that
> step?
>
> Gabino
>
> ----- Original Message -----
> From: "Michael Pliskin" <pl at tepkom.ru>
> To: "Gabino Travassos" <gabino at moteinteractive.com>
> Cc: <swfmill at osflash.org>
> Sent: Saturday, April 12, 2008 1:20 AM
> Subject: Re: [swfmill] Splitting simple dialect in several files
>
>
> > Hello Gabino,
> >
> > <include> doesn't have an id attribute as it is pure 'compile-time'
> > construct, to split a large XML file into pieces (and to re-use some
> > of them in other projects maybe). This is the feature I asked Ralf
> > to add several months ago, and now I can build swfmill for win32, so
> > I've tried to test and found that smth is not so simple here.
> >
> > Multiple -swf-lib's could work but haxe doesn't allow that
> > unfortunately :(
> >
> > Mike
> >
> >> Oh. Not the easy 2-second answer then...
> >
> >> I tried the <include id="otherfile" file="temp.xml" /> and <clip
> >> id="otherfile" import="temp.xml" /> and neither worked. Are you doing
> >> something like:
> >> swfmill file1.xml file1.swf
> >> swfmill file2.xml file2.swf
> >> and then using both these in haXe as separate swf -lib items?
> >
> >> I imagine there are some OK workarounds for this.
> >
> >> Gabino
> >
> >
> >
> >> ----- Original Message -----
> >> From: "Michael Pliskin" <pl at tepkom.ru>
> >> To: "Gabino Travassos" <gabino at moteinteractive.com>
> >> Cc: <swfmill at osflash.org>
> >> Sent: Friday, April 11, 2008 9:25 AM
> >> Subject: Re: [swfmill] Splitting simple dialect in several files
> >
> >
> >>> Hello Gabino,
> >>>
> >>> thanks for the reply, this <import> is to be used as a sample only -
> >>> it has id attribute in reality, and it works without <include> tag,
> >>> so the problem is not here - the <include tag> is what I am trying
> >>> to make work..
> >>>
> >>> Mike
> >>>
> >>> GT> I'm just guessing here, but I think the import tag needs a referrer
> >>> name.
> >>>
> >>> GT> Here's an XML file I made that has a jpeg and mp3 embedded in it:
> >>>
> >>> GT> <?xml version="1.0" encoding="UTF-8" ?>
> >>>
> >>> GT> <movie version="8" width="800" height="600" framerate="30">
> >>>
> >>> GT> <background color="#fcfcfc" />
> >>>
> >>> GT> <library>
> >>>
> >>> GT> <clip id="img1" import="images/784I.jpg" />
> >>>
> >>> GT> <clip id ="fallout" import="the_fallout_PunkIsDead.mp3" />
> >>>
> >>> GT> </library>
> >>>
> >>> GT> <frame>
> >>>
> >>> GT> <place id="fallout" /><place id="file1" />
> >>>
> >>> GT> </frame>
> >>>
> >>> GT> </movie>
> >>>
> >>> GT> I get SWFMill to export and swf from this: swfmill simple file.xml
> >>> file.swf
> >>> GT> in my .hx file I am referring to it:
> >>> GT> var fallout=new Sound(null);
> >>>
> >>> GT> fallout.attachSound("fallout"); // this is the id from the xml file
> >>>
> >>> GT> fallout.start();
> >>>
> >>>
> >>> GT> And my .hx file needs this at the top:
> >>> GT> import flash.Sound;
> >>>
> >>>
> >>>
> >>> GT> ----- Original Message -----
> >>> GT> From: "Michael Pliskin" <pl at tepkom.ru>
> >>> GT> To: "Ralf Fuest" <ralf-fuest at gmx.de>
> >>> GT> Cc: <swfmill at osflash.org>
> >>> GT> Sent: Friday, April 11, 2008 8:05 AM
> >>> GT> 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
> >>>>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Best regards,
> >>> Michael mailto:pl at tepkom.ru
> >>>
> >>>
> >>>
> >
> >
> >
> >
> > --
> > Best regards,
> > Michael mailto:pl at tepkom.ru
> >
> >
>
>
>
> _______________________________________________
> swfmill mailing list
> swfmill at osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
_______________________________________________
swfmill mailing list
swfmill at osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org
More information about the swfmill
mailing list