A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Update/Edit XML File

  1. #1
    Junior Member
    Join Date
    Apr 2003
    Location
    Knoxville, TN
    Posts
    24

    Update/Edit XML File

    i posted this in a thread in the XML section, but it's a ghost town.

    let's say i want to change product b's price from 1.25 to 2.25... what method do you use in flash to accomplish this? i know createElement("name") makes a new element, but i'm wanting to update a current one.

    i assumed this would work...

    PHP Code:
    this.firstChild.childNodes[0].nodeValue "2.25"
    it does, but just in flash. as soon as i reload the flash file, it's back to 1.25 and the xml file never changes.

    mystore.xml
    --------------

    PHP Code:
    <store>
       <
    product name="product a">
          <
    type>vegetable</type>
          <
    price>5.50</price>
       </
    product>
       <
    product name="product b">
          <
    type>fruit</type>
          <
    price>1.25</price>
       </
    product>
       <
    product name="product c">
          <
    type>meat</type>
          <
    price>8.50</price>
       </
    product>
    </
    store

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    To do what you want to do you have to communicate with the server using a script. The lement you create will only be present as long as your movie is running and will then disappear.

    Here is a turorial, although I don't know it is what you need.

    http://www.macromedia.com/support/fl...xml/xml02.html
    Last edited by cancerinform; 05-08-2003 at 02:38 PM.
    - The right of the People to create Flash movies shall not be infringed. -

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