The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 4 of 4

Thread: Flash variables call XML

  1. #1

    Problem calling XML with Flash variable

    Hey everyone...

    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.

    Jellybean
    Last edited by Jellybean; April 12th, 2005 at 03:42 AM.

  2. #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.

    Cheers!

  3. #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!

    Jellybean

  4. #4
    Assuming you have the XML load all setup, then just assign the nodevalue you want to a global variable:

    Code:
    _global.myGlobalVariable = this.firstChild.childNodes[0].nodeValue;
    If you don't have the XML load all setup up then check here:
    http://www.kirupa.com/developer/acti...dataflash2.htm


    Cheers!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012