Forum Moderators: open
the variable has to be defined outside the function first then it's value can be changed inside one function and that change can be referenced from another function.
*******************
var globalVariable:String = "";
function setVari(Event:EVENT):void {
globalVariable = "hello world";
}
function useVari(Event:EVENT):void {
trace(globalVariable);
}
*******************
Sorry and thanks to anyone who was working this out in their head.
[edited by: Demaestro at 7:22 pm (utc) on Aug. 27, 2007]