Ah, easy:

replace <call object="Main" method="main"/>
with <call object="Application" method="main"/>

Hth,
Mark



On 5/19/06, Andrei Stebakov <[EMAIL PROTECTED]> wrote:
>
> The code of the main class is:
>
>
>
> class Application extends MovieClip
> {
>  var tfCaption:TextField;
>
>  // Clips attached dynamically from Swfmill library
>  var mcSpheres:MovieClip;
>
>  var sW:Number = null;  // Stage width
>  var sH:Number = null; // Stage height
>
>  private function Application ( target )
>  {
>   // Link movie clips to classes
>   Object.registerClass ( "spheres", Particle );
>
>   // Assimilate the target
>   target.__proto__ = this.__proto__;
>   target.__constructor__ = Application;
>   this = target;
>
>   // Store stage dimensions for easy look-up
>   sW = Stage.width - 1;
>   sH = Stage.height - 1;
>
>   // Draw border around the stage
>   lineStyle ( 1, 0x000000 );
>   moveTo ( 0, 0 );
>   lineTo ( sW, 0 );
>   lineTo ( sW, sH );
>   lineTo ( 0, sH );
>   lineTo ( 0, 0 );
>
>   //
>   // Create a caption
>   //
>   var captionTextFormat = new TextFormat();
>   captionTextFormat.size = 12;
>   captionTextFormat.font = "_sans";
>
>   var captionText:String = "Made with FAMES (FAME + Swfmill)";
>
>   var captionTextExtent:Object = captionTextFormat.getTextExtent (
> captionText );
>   var captionWidth:Number =
> captionTextExtent.textFieldWidth;
>   var captionHeight:Number =
> captionTextExtent.textFieldHeight;
>   var captionX = sW / 2 - captionWidth / 2;
>   var captionY = sH - captionHeight;
>
>   createTextField( "tfCaption", 10000, captionX, captionY, captionWidth,
> captionHeight );
>
>   // Write caption text
>   tfCaption.text = captionText;
>
>   // Add ten particles
>   for ( var i = 0; i < 10; i++ )
>   {
>    // Attach a sphere clip
>    attachMovie ("spheres", "mcSphere", 1000 + i );
>   }
>  }
>
>  static function main ()
>  {
>   // Create an Application instance and
>   // have is assimilate _root.
>   var test:Application = new Application( _root );
>  }
> }
>
>
>
> On 5/19/06, daniel fischer <[EMAIL PROTECTED]> wrote:
> > "Andrei Stebakov" <[EMAIL PROTECTED]> (on Fri, 19 May 2006 13:19:09
> -0400):
> >
> > > 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?
> >
> > apart from that you probably dont want two libraries and frames, the swfml
> looks alright. could you post your main class too, plz?
> >
> > -dan
> >
> > --
> > http://0xDF.com/
> > http://iterative.org/
> >
> > _______________________________________________
> > swfmill mailing list
> > swfmill@osflash.org
> > http://osflash.org/mailman/listinfo/swfmill_osflash.org
> >
>
>
> _______________________________________________
> swfmill mailing list
> swfmill@osflash.org
> http://osflash.org/mailman/listinfo/swfmill_osflash.org
>
>
>


-- 
http://snafoo.org/

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

Reply via email to