[Flashcoders] 1120: Access of undefined property

2009-09-03 Thread Isaac Alves
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

Re: [Flashcoders] 1120: Access of undefined property

2009-09-03 Thread Ian Thomas
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

Re: [Flashcoders] 1120: Access of undefined property

2009-09-03 Thread Patrick Matte
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

RE: [Flashcoders] 1120: Access of undefined property

2009-09-03 Thread Cor
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

Re: [Flashcoders] 1120: Access of undefined property

2009-09-03 Thread Gregory Boland
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