A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Basic XML question

  1. #1
    Junior Member
    Join Date
    Mar 2000
    Posts
    19
    I have been trying to figure out how the Slashdot example works.

    I was able to alter it and pass in my own values from my own page.

    Here is my question.

    From scratch I would like to load an xml page
    get the values and then display them in a dynamic text box in my page.

    Is this the correct way to go about it?
    1.First create an newXML object.
    2.Load the page

    (this is where I get lost I think)
    3.somehow figure out what the data is that is passed

    4.set variables to equal the data that was passed.

    5.display the variables in a dynamic text box.


    I am trying this at a very base level by myself and I am not even going to get into arrays yet

    here is my xml.

    <?xml version='1.0' encoding='UTF-8' standalone='yes'?>
    <pressroom>
    <headline>Headline1</headline>
    <story>blablabla bla bla bla</story>
    <date>10/10/00</date>
    </pressroom>

    My goal is to somehow get this data passed in and to display in my movie.

    Any tips would be appreciated.

    Flashmonkey

  2. #2
    Junior Member
    Join Date
    Mar 2000
    Posts
    19

    first step of many I hope.

    I am obsessed with XML and flash.

    here is my first success!

    It may be cheezy and simple but for me it was an encouraging breakthrough.

    here is the code that worked for me! I have a dynamic text box on the main time line. I pass the value of the xml to it!

    If any of you XML/Flash experts have any tips please let me know.

    My next goal is to actually try to do something with multiple nodes and to actually load the values from an external xml file.


    doc = new XML("<member><username>Bob</username></member>");
    //I made my own simple xml here with the parent node member and a child username with the value bob. It does not display too well on this board.
    // get the firstchild
    docfirstnode = doc.firstchild;
    //get the value of the firstchild node
    firstvalue = docfirstnode.childNodes;


    _root.myxml2 ="<font size=\"-1\">User <b>"+firstvalue+"</b> loged in.</font><br>";
    [Edited by flashmonkey on 10-09-2000 at 11:15 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