T. Michael Keesey wrote:
 
> I'm confused--why would you extend MovieClip for a static class? Or do
> you mean something other than "a class that only has static fields and
> methods" when you say "static class"?

It is confusing, and I'll admit my post wasn’t real clear.

"static" has a couple meanings in Flash. In the context of a class, static 
means the method or property belongs to the class, not the object derived from 
the class. Of course you know that, or you wouldn't be asking the question.

The other context is static, as opposed to dynamic, libraries. Basically, with 
a dynamic library, you have the source code, and it's compiled along with your 
other source. With a static library, you only distribute the object code. You 
might want to do this with a robust library for internal use, or for a library 
you distribute for public use, but don't want to give out your source code 
(with the usual caveats that your source code is never really safe in Flash).

A compile-time class library (a static library) in AS2, since MX 2004, is 
usually a component, and a V2 component is, by definition, a Movie Clip. In its 
definition it must extend MovieClip. That's just the architecture of 
components. For example:

class com.services.myClass extends MovieClip

The keyword "static" is conspicuously absent there. Perhaps that's the 
confusion. You don't declare the class static like you would a method or a 
property.

Is that more clear?

Cordially,

Kerry Thompson


_______________________________________________
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