# Class| Function Tunnel

**URL:** https://forum.kirupa.com/t/class-function-tunnel/189377
**Category:** flash
**Created:** [June 2, 2006, 2:03am UTC](https://forum.kirupa.com/t/class-function-tunnel/189377 "2006-06-02T02:03:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jopiruizen](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jopiruizen](https://forum.kirupa.com/u/jopiruizen)
#### Post date: [June 2, 2006, 2:03am UTC](https://forum.kirupa.com/t/class-function-tunnel/189377/1 "2006-06-02T02:03:41Z")

</div>

Hello everyone,

I have a simple quesiton about class, method and functions inside a method and class properties…

here’s my problem…

I created a new class form my custom component… But upon developing it i found out that you can not access a property inside the function which is also inside a method…

example

```auto

 
class myClass{
 
private var myProperty:Number = 1; //default is 1
 
//constructor
public function myClass(){
}
//Method 
public function setMyP(pMyP:Number){
this.myProperty = pMyP;
}
 
//The Problem that exist
 
 
public function getMyP(){
trace(this.myProperty); // Output 1
function SomeFunction(){
trace(this.myProperty); // undefined <------------
}
 
SomeFunction();
}
}

```

What I want to do is to access the property inside the method… I also have a work-around still i cannot point a certain variable to a property of my class inside the method’s function…
