Results 1 to 4 of 4
Thread: Flash variables call XML
April 12th, 2005, 03:32 AM #1
Problem calling XML with Flash variable
First off all, thank you so much. All your tutorials, articles and forum questions have helped me so much in developing a website that is now almost finished...
Only my most important part isn't working, my text content!!!
I have this problem:
I want my Flash menu buttons to contain a certain variable/string like for example: content_xml.firstChild.firstChild.
Then I want to goto a frame where my XML file will load and insert the string here for retrieving data from XML, but I just can't seem to get it to work...
When I set a variable IN the XML load function it works fine, but when I put it out it doesn't work anymore. And it has to be a global variable which loads on the first frame of the main movie.
Hope you guys and gals can help me.. I'm really stuck here.
Last edited by Jellybean; April 12th, 2005 at 03:42 AM.
April 12th, 2005, 09:26 AM #2
If your putting it outside the onLoad then maybe the XML data isn't even in there yet when you try to assign the variable. Didn't really understand the structure of the whole thing.
April 12th, 2005, 12:17 PM #3
Let me rephrase it different.. Because my first wuestion is indeed a bit hard to understand....
How can I load an XML on start and load the different elements into different global variables...
I need this to make my menu call the different text into dynamic text boxes when I click the coresponding button.
Is this better? A bit I hope.....
Hope you can help me guys!
April 12th, 2005, 06:34 PM #4
Assuming you have the XML load all setup, then just assign the nodevalue you want to a global variable:
_global.myGlobalVariable = this.firstChild.childNodes.nodeValue;
By senocular in forum Best of Kirupa.comReplies: 21Last Post: March 26th, 2004, 11:20 AM
By Victor J. Servi in forum Flash IDEReplies: 1Last Post: November 27th, 2003, 04:43 PM
By jenwhitie in forum Flash IDEReplies: 4Last Post: August 19th, 2003, 07:03 PM
By relish in forum Flash IDEReplies: 1Last Post: April 16th, 2003, 03:03 PM
By lydia219 in forum Flash IDEReplies: 4Last Post: March 21st, 2003, 02:12 AM