# Accessing nested functions and scope?

**URL:** <https://forum.kirupa.com/t/accessing-nested-functions-and-scope/290915>\
**Category:** flash\
**Created:** [June 22, 2009, 8:50am UTC](https://forum.kirupa.com/t/accessing-nested-functions-and-scope/290915 "2009-06-22T08:50:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SonOfChaos](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@SonOfChaos](https://forum.kirupa.com/u/SonOfChaos)\
**Post date:** [June 22, 2009, 8:50am UTC](https://forum.kirupa.com/t/accessing-nested-functions-and-scope/290915/1 "2009-06-22T08:50:59Z")

</div>

Okay, this would make my life a lot easier if this could be done somehow.  
How can one class access a nested function in another class.  
Examplish.

```auto

main class{
   public function main(){
      doSomethin();
   public function doSomethin(){
              secondFile.dostuff();
          function doSomethin2(){ // <----Nested Function
             

        }
      }
   }
}
//In a separate file
public function dostuff(){
     // <====== needs to call doSomethin2() from here somehow when it finished its dostuff!

}
public function

```

Also, thanks for putting up with my bombardment of stupid.
