Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,005
    Thanks
    58
    Thanked 10 Times in 10 Posts

    How do I create an array from an XML file

    How do I create an array from an XML file.

    Code:
    < ?xml version='1.0' encoding='utf-8'?>
    <songs>
    <song name="Pixel2Life Soundtrack 01" file="music/despair.mp3" >
    </song><song name="Twodded Soundtrack 01" file="music/forest.mp3" >
    </song></songs>
    Usually I create the array manually.

    Code:
    var songs:Array = ["smusic/despair.mp3", "music/forest.mp3"];


  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    I don't know much about flash/xml, but I guess your are trying to achieve something like this. http://www.*******************/?item=jw_flv_media_player, the source is also available
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    Senior Coder nikos101's Avatar
    Join Date
    Dec 2006
    Location
    London
    Posts
    1,005
    Thanks
    58
    Thanked 10 Times in 10 Posts
    thx but I don't want to go that complex, I just dont want to have to change the .fla file to change the music


  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Hey nikos101, all that you neded to do in this case is just edit a sample xml file(comes along with the zip) to point to your song files.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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