There are a number of ways of essentially 'hacking' AS2 to behave in a
more classic OO manner. Personally, as it IS a hack no matter what you do
in AS2, I always keep it simple and just import a Main.as file, rather
than go to unnecessarily elaborate lengths to fool myself that I'm really
using a stricly typed, perfectly conventioned OO based language. But fear
not, AS3 will let you create the document class you long for. In the most
mature example of popular commercial OO based code, Java, the best
practice is always to call the main dcument class "main". If you stick
with Java best practices you won't go wrong with AS.

Sean McSharry

> 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