Does anyone have any idea how to call variables outside of functions in flash? What I mean is, if I set up a variable inside a function and then try to trace that variable outside of the function it will come up undefined, does anyone know how to get round this?
Just to give an example, if I were to try this:
I would get an undefined in the output box.Code:onLoad = function(){ myName="bob"; } trace(myName);
There must be a way round this, but I cant figure it out and its driving me absolutely nuts.
For the record I have tried using root and global variables but the result is the same.


LinkBack URL
About LinkBacks
Reply With Quote
