PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Xml

  1. #1
    Join Date
    Aug 2008

    Question Xml

    Hi there

    I have xml document contains data.My flash document also shows the data inside xml file.Now I need it to be dynamic and work dynamically.I need when I manually add an item at the end of "XML" file, it appears in flash document.


  2. #2
    Join Date
    Mar 2007
    From what I can gather from what you said, you've duplicated the xml data from the file and put it in your flash document.
    You do not need to do this.
    You can load the xml directly into the document.

    Actionscript Code:
    var myXML:XML = new XML();
    myXML.ignoreWhite = true;
    var xmlItems:Array = new Array();

    myXML.onLoad = function(success:Boolean) {
        if (success) {
    mxlcount = this.firstChild.*.length;
    for (i=0; i<xmlcount; i++) {
            xmlItems[i] = this.firstChild.childNodes[i].firstChild.nodeValue; //this depends on your xml layout.
    } else {
    trace ("Error loading XML document");

    From here you can now use the data array for your needs.
    There are also plently of xml tutorials out there which will be much more help than I am.

  3. #3
    Join Date
    Aug 2008
    Hi Vinchenzision.
    Thank you very much, it works.

    WIth regards

Posting Permissions

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

Click Here to Expand Forum to Full Width

HTML5 Development Center