Var Inside Function

Hi,

I know this has been asked before but no solid answer yet.

I want to declare a var inside a function and then access it from the outside. This does not work. I know i can do it with classes or declaring it from teh outside but for this project it would be to complex. So please, is there any way of declaring a var inside a function and get access to it from the outside.

Example:

init()
function init () {
var myVar=12345
}

trace(myVar)
//Result = 1120: Access of undefined property myVar.