RE: [Flashcoders] Static without extending Movieclip (2.0)

2007-09-07 Thread Kerry Thompson
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


Re: [Flashcoders] Static without extending Movieclip (2.0)

2007-09-07 Thread T. Michael Keesey
On 9/7/07, Kerry Thompson <[EMAIL PROTECTED]> wrote:
Helmut Granda wrote:

> When creating a static class that extends movieclip

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"?

-- 
Mike Keesey
___
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


RE: [Flashcoders] Static without extending Movieclip (2.0)

2007-09-07 Thread Kerry Thompson
Helmut Granda wrote:
 
> When creating a static class that extends movieclip it loads into
> another movie properly but if I do not extend the static class to
> movieclip the movie remains. Does anyone has any idea why this
> specific behavior happens?

I think it's part of the architecture. I assume you're creating a component
(the only uses I know of for static classes is components and class
libraries). AS2 components are, by definition, Movie Clip subclasses, so you
have to make the class extend MovieClip.

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


[Flashcoders] Static without extending Movieclip (2.0)

2007-09-07 Thread Helmut Granda
When creating a static class that extends movieclip it loads into
another movie properly but if I do not extend the static class to
movieclip the movie remains. Does anyone has any idea why this
specific behavior happens?

Basically I have 10 movies and  9 of them were built the normal way
but this other movie was created with a static class. All movies are
loaded into a shell and when any of the 9 normal movies are loaded
into the shell they work properly but once the movie that was created
with the static class is loaded nothing else can be loaded after that
unless I extend the static class to a the movieclip.

-part of the static lass below


class  classes.util.Class

{




private function Class ( ) {}


public static function create( mc:MovieClip ) : Void

{

mc.__proto__ = BannerGallery.prototype;
 mc.init();

}

private function init()

{

bannerArray = _parent.bannerArray;
path= "path1/path2/";


___
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