Running a function onload (?)

Is there a way that I can run a function when it first loads, as if it wasn’t inside of the function, but still be able to call that block of code as a function later on?

For example if I did…


someFunction();

function someFunction():void{
//do this
}

It wouldn’t work correctly… I need it to do what is inside the function as if it wasn’t in the function, which it loads, but also be able to call it again later on.