d
Ngo
Sent: Tuesday, April 24, 2007 9:01 PM
To: flashcoders@chattyfig.figleaf.com
Subject: RE: [Flashcoders] Class for movie - best practice question
Why would you extend MovieClip and composition a MovieClip as well?
Seems a
bit redundant, no?
-Original Message-
From: [EMAIL PROTECTED]
[m
: [Flashcoders] Class for movie - best practice question
Try this class. Put new ApplicationClass(this); on the first frame of
the timeline.
import mx.events.EventDispatcher;
class ApplicationClass extends MovieClip{
public var addEventListener:Function;
public var
Try this class. Put new ApplicationClass(this); on the first frame of
the timeline.
import mx.events.EventDispatcher;
class ApplicationClass extends MovieClip{
public var addEventListener:Function;
public var removeEventListener:Function;
private var dispatchEvent
If you like Java so much, why don't you marry it?
If you want to make deferential commentary regarding Actionscript, go to
Java forums and seek validation from your Java friends. Unlike us
Flashcoders, I'm sure they'd be happy to oblige.
It's extremely easy to make a document class in AS2 an
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 s
Best practices:
A lot of people use main.swf and main.as. FLASC/MTASC has a feature to
support this very functionality.
Never put classes in the same folder as your movie. Always put them in
a namespace folder chain.
For instance:
class com.clientname.projectname.Main
HTH,
Steven
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 applicatio
7 matches
Mail list logo