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
Because your function is static.
Either make your var static too:
public static var counter:int=0;
or make your function non-static.
I'm sure you can Google static/non-static class members, but in short,
anything that's non-static is only available from within a class
instance (i.e. someone
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
Because you function is static
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Isaac Alves
Sent: donderdag 3 september 2009 21:24
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] 1120: Access
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 isaacal...@gmail.com wrote:
could someone please tell me why in the following script , the flash
runtime doesn´t recognize the var counter?
1120: Access of
5 matches
Mail list logo