Can I call a function within a function?

Hi all wizz.

I have a function within another function. Is it possible to call the function inside the function from the maintimeline.

See example code. I want to call the function called sub from outside off the function called main.


function main():void{
// Do something
     function sub():void{
    //do something
    }
}

Much appreciated for yr help