One way:
In the same directory as your SWF. Have a main class with a static function that takes in a movie clip.
In your FLA put code in Frame 1 like:
MainClass.main(this);

The "this" is the root movie clip. The static function main will pass it around to who ever needs it in your application. It depends how you want to handle it but this is a starting point.

Hope this helps,
Rob.

Johan Nyberg wrote:
Hi, just wanted to know if there is a best practice when creating a class for the mother movie (i.e. the flash-movie itself). Is
this the way to go?

var mother:MyFabFlashApp = new MyFabFlashApp();

..or is there a better way? Seems kind of a stupid question, but I wanted to put it anyway in case I've missed something. ;-) I'veput my main code on the first frame of the _root timeline for too long, and want to move it into a class.

Regards,
/Johan Nyberg

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to