PDA

View Full Version : musicPlayer Voting System. AS3 coding help


ojk007
12-15-2006, 11:33 PM
Hey ok so i have a working mp3 player, and now i need to integrate a voting system.

Heres an overview.
2apps

End user
Server

End User
- contains a datagrid with a list of all the songs (music.xml)
- Is where the user votes for selected song

Server
- Is where the songs play
- Is where the playlist is calculated

heres my music.xml. note this is one entry on 7000+

quote:
<?xml version="1.0" encoding="utf-8"?>
<files>
<song>
<songID>1</songID>
<name>Is This It</name>
<artist>The Strokes</artist>
<album>This is It</album>
<genre>Unknown</genre>
<bitrate>224 </bitrate>
<length>2:35 </length>
<filename>01 Is This It.mp3</filename>
<votes>0</votes>
<played>0</played>
</song>



the <votes> and >played tags are where the magic happens.

i dont know how i can sort through the xml file to find the song with the highest votes. also when the song has been played <played> should = 1. so the datagrid row can be disabled(any suggestions on that as well)

Now im just starting with flex but i'm not a newbie coder.

Thanks heaps