Hi Andrei,
This looks correct, is the resulting SWF smaller if you <!-- comment
out --> the <clip import="..." /> part? If so, it gets imported as it
is supposed to. (It doesn't have to be inside a <library/> tag, btw.)
The way it is now, it assumes you have a class Main with a static
method main() in your classes.swf. If so, it should get called. You
could also skip that part and add -main to your mtasc arguments, but
you'd still need a static method main().
Here's a short example Main.as that /should/ work (i.e., I am too lazy
to test it):
class Main.as {
public function Main () {}
public static function main () {
var sphere:MovieClip = _root.attachMovie( "spheres", "sphere1", 1 );
sphere.onEnterFrame = function () {
this._x += Math.random() * 4;
this._y += Math.random() * 3;
};
}
}
Dan: I guess Jon is right, it's the one thing everybody can answer
because we all need to do it :)
Hth,
Mark
On 5/19/06, Andrei Stebakov <[EMAIL PROTECTED]> wrote:
>
> Ok, I created the xml file:
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <movie width="320" height="240" framerate="30">
> <background color="#ffffff"/>
> <frame>
> <library>
> <clip id="spheres" import="library/spheres.png"/>
> </library>
> </frame>
>
>
> <library>
> <clip import="classes.swf"/>
> </library>
> <frame>
> <call object="Main" method="main"/>
> </frame>
> </movie>
>
> The code in classes.swf is suppoesed to animate the spheres.png takend from
> the assets. I still see the blank window when I launch the resulting
> application.swf file. Do I mis-compose the assets in the application.xml ?
>
> Thanks,
> Andrew
>
>
>
>
>
>
> On 5/19/06, daniel fischer <[EMAIL PROTECTED]> wrote:
> > Andrew,
> >
> > it depends on your "Entry Point Method". You can
> > a) construct the swf containing your assets with swfmill, then use MTASC
> to compile "into" the swf, and use mtasc's -main (i'd call this
> "traditional")
> > b) compile the code first, generating "classes.swf", then import that
> using swfmill (<clip import="classes.swf"/>), likely calling main from swfml
> (<call object="Main" method="main"/>) ("swfmill as linker" or sth.)
> > c) not use main at all, but just couple classes to your <clip/>s (i think
> that's called "Natural" entry point method)
> >
> > to probably make it clearer, what i do for swfmill's informal test is
> method b):
> >
> > #mtasc -cp .../std -swf classes.swf -header 320:240:25 Main.as
> > #swfmill -v simple test.swfml output.swf
> >
> > with a test.swfml of basically:
> > "
> > <movie width="450" height="270" framerate="15">
> > <library>
> > <clip import="classes.swf"/>
> > </library>
> > <frame>
> > <call object="Main" method="main"/>
> > </frame>
> > </movie>
> > "
> >
> >
> > hope that helps, i'm sorry that swfmill docs are so sparse.
> >
> > -dan
> >
> >
> > "Andrei Stebakov" <[EMAIL PROTECTED] > (on Fri, 19 May 2006 12:27:40
> -0400):
> >
> > > Hi,
> > >
> > > I just started with Flash and probably have the most stupid question...
> > > Looks like I miss one step how to actually link the swf file generated
> by
> > > swfmill and the sfw file generated by mtasc.
> > > I am looking at
> http://aralbalkan.com/index.php?p=373&more=1&c=1 (FAMES
> > > tutorial) and I can't understand how the application.swf generated by
> mtasc
> > > from application.as and application.swf generated from the xml file end
> up
> > > merged together?
> > >
> > > Any pointers are greatly appreciated!
> > >
> > > Andrew
> >
> >
> >
> > --
> > http://0xDF.com/
> > http://iterative.org/
> >
> > _______________________________________________
> > swfmill mailing list
> > [email protected]
> > http://osflash.org/mailman/listinfo/swfmill_osflash.org
> >
>
>
> _______________________________________________
> swfmill mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
>
>
>
--
http://snafoo.org/
_______________________________________________
swfmill mailing list
[email protected]
http://osflash.org/mailman/listinfo/swfmill_osflash.org