function create()
{
var myvariable:string='hello world';
}
create()
trace(myvariable)
will give undefined if you use var within a function then the variable is local to the function and only available within the function to trace it outside the function drop the var
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.