|
|
|
#1 |
|
Junior Member
Join Date: Jul 2004
Location: SA
Posts: 18
|
global Variables help! seriously.....
Hi all, I got a global variable that I want to see the output for using trace.
The problem is it comes out blank when I do trace. It gets it data from an xml file. I don't see how it could not get data. If I put the trace inside the function it outputs a value but not outside the function. Must I make the function global or something? Please help!
EDIT: Changed code tags to [ as ] tags - jbum Last edited by jbum; 10-14-2004 at 04:09 AM. |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2004
Location: Los Angeles
Posts: 2,920
|
The problem is due to a misunderstanding of the order in which these lines execute.
At the time your trace() at the bottom executes, the onLoad() function has not yet executed, so _global.xValue has not been assigned from the XML yet. The onLoad() function will execute later, and when it does, then _global.xValue will be defined. |
|
|
|
|
|
#3 |
|
Member
Join Date: Oct 2003
Location: Colorado Springs
Posts: 82
|
So place your trace at the end of your onSuccess function
__________________
Justin Blough MindWireMedia (719) 659-8062 justin.blough@mindwiremedia.net http://www.mindwiremedia.net |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jul 2004
Location: SA
Posts: 18
|
Resolved
Shot guys, works perfectly thanx.
|
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|