操作脚本按顺序对xml feed进行排序

| 我已经适应了以下脚本,我想删除随机脚本并改为对其进行更改,以使其以xml提要的顺序显示,我已经尝试过了,但对我来说无效。 我需要修改以下行:
_global.song_nr = random(songfile.length);
完整脚本
    playlist.onLoad = function(success) {
    if (success) {
        _global.songname = [];
        _global.songband = [];
        _global.songimg = [];
        _global.songdate = [];
        _global.songfile = [];
        for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
            _global.songname[i] = playlist.firstChild.childNodes[i].attributes.name;
            _global.songband[i] = playlist.firstChild.childNodes[i].attributes.artist;
            _global.songimg[i] = playlist.firstChild.childNodes[i].attributes.img;
            _global.songdate[i] = playlist.firstChild.childNodes[i].attributes.date;
            _global.songfile[i] = playlist.firstChild.childNodes[i].attributes.file;
            trace(songname[i]+\"  \"+songband[i]+\"  \"+songimg[i]+\"  \"+songdate[i]+\"  \"+songfile[i]);
        }
    }
    _root.createEmptyMovieClip(\"sound_mc\", 1);
    _root.sound_mc.sound_obj = new Sound();
    _global.song_nr = random(songfile.length);
    _root.sound_mc.songStarter(songfile[song_nr], songname[song_nr], songband[song_nr], songimg[song_nr], songdate[song_nr]);
};
已邀请:
谢谢@GeorgeProfenza这个作品-简单:)
_global.song_nr = 0;

要回复问题请先登录注册