# Class and inheritage

**URL:** https://forum.kirupa.com/t/class-and-inheritage/230863
**Category:** flash
**Created:** [June 29, 2007, 2:49pm UTC](https://forum.kirupa.com/t/class-and-inheritage/230863 "2007-06-29T14:49:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Flufferino](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@Flufferino](https://forum.kirupa.com/u/Flufferino)
#### Post date: [June 29, 2007, 2:49pm UTC](https://forum.kirupa.com/t/class-and-inheritage/230863/1 "2007-06-29T14:49:12Z")

</div>

Hi, I’m a OOP newbie and I can’t understand why my functions nested in another function within a class is undefined, better to explain in code

```auto
class A{
function A(){
    _root.somebutton.onRelease = function(){
        trace('this works')
        b()
    }
}
function b(){
    trace('this doesnt')
}
}

```

the onRelease triggers since the first trace lands in the output, but why doesn’t the b() function get called?  
I asume it’s some hiearky stuff, right?

Someone help pls.
