Because you function is static

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Isaac Alves
Sent: donderdag 3 september 2009 21:24
To: [email protected]
Subject: [Flashcoders] 1120: Access of undefined property

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