static function, they have a limited scope, can't see class variables unless
their static

On Thu, Sep 3, 2009 at 3:23 PM, Isaac Alves <[email protected]> wrote:

> could someone please tell me why in the following script , the flash
> runtime doesn´t recognize the var counter?
> 1120: Access of undefined property counter.
>
> package
> {
>  public class StringUtils
>  {
>        public var counter:int = 0;
>
>    public static function generateRandomString(newLength:uint = 1,
> userAlphabet:String =
> "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"):String
>        {
>                trace (counter);
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to