A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Fomatting XML

  1. #1
    Senior Member
    Join Date
    Aug 2002
    Location
    LBV, Fl
    Posts
    102

    Fomatting XML

    I want to format XML tags just like you would do with HTML. How can I do that.

    Here is what I have for the AS
    Code:
    var content = new XML();
    content.onLoad = start;
    content.load("somexmlfile.xml");
    content.ignoreWhite = true;
    function start(success) {
    if (success == true) {
     rootNode = content.firstChild;
     firstImageNode = rootNode.firstChild;
     currentImageNode = firstImageNode;
     updateImage(firstImageNode);
     //
     title.text = rootNode.childNodes[1].firstChild.nodeValue;
     //
     type.text = rootNode.childNodes[2].firstChild.nodeValue;
    }
    }
    function updateImage(newImageNode) {
    imageholder.loadMovie(newImageNode.attributes.jpegURL);
    info = newImageNode.firstChild.nodeValue;
    }
    What I am trying to do is load text into three diferent text fields and one picture into a mc.

    If anyone has any better suggetions on how to clean this mess up or add to it PLEASE HELP. I have spent too long on this I just want to get it done.

    Also I have different buttons that will load different data is there a way that I can compact it all into one xml file instead of different ones. So when someone clicks on a different button everything changes.
    Last edited by taimaging; 02-03-2005 at 02:11 AM.

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