Juan Pablo Califano wrote:

> In actionscript you have only local and "global" scope. Meaning a variable
> can be declared as local to the function or in the class that contains it.

That's true, and relevant to the OP's problem. Juan Pablo is rignt on
the money, so I'm going to pick up where he left off and talk about
private, protected, and public vars, even though it will lead us a bit
OT.

A private variable is available only to the class that declares it. A
protected variable is available to that class and all derived classes.
Of course, you can make any variable accessible with a getter or
setter method.

In OOP AS3, only public variables are truly global. If you don't
declare a variable to be private or protected, it is global by
default.

Cordially,

Kerry Thompson
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to