# 1120: access of undefined property error

**URL:** https://forum.kirupa.com/t/1120-access-of-undefined-property-error/306676
**Category:** flash
**Created:** [March 19, 2010, 7:24pm UTC](https://forum.kirupa.com/t/1120-access-of-undefined-property-error/306676 "2010-03-19T19:24:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![stilllearning](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@stilllearning](https://forum.kirupa.com/u/stilllearning)
#### Post date: [March 19, 2010, 7:24pm UTC](https://forum.kirupa.com/t/1120-access-of-undefined-property-error/306676/1 "2010-03-19T19:24:32Z")

</div>

Hi,

I am a flash newbie, and am getting some errors with actionscript.

I have some variables defined in my class but for some reason I am unable to access them inside my class functions.

public class sender{  
…  
public var errorcode:int;

```
   public static function sendObject(){ 
       ..............
       errorcode = -1; // set error 
       ..............
       }
............

```

}

This throws the error 1120: Access of undefined property errorcode.

Could someone help me figure out what might be wrong ?

Thx !!!
