Frame 1
function startplay() {
if (auto == true) {
var _local2 = _root.player.getCurrentIdx();
_root.player.playTrack(_local2);
} else if (((auto == false) || (auto == undefined)) || (auto == "")) {
_root.player.stopTrack();
}
}
function titleGoGoGo() {
function TxtScroll() {
title_mc._x = title_mc._x - 1;
if (title_mc._x <= (31 - (txtwidth - maskwidth))) {
if (def == true) {
title_mc.duplicateMovieClip("title_mc1", 1);
title_mask.duplicateMovieClip("title_mask1", 2);
title_mc1._x = (maskwidth + 31) + 10;
title_mc1.musicname.htmlText = title_mc.musicname.htmlText;
title_mc1.setMask(title_mask1);
title_mc1.musicname._width = txtwidth;
def = false;
}
title_mc1._x = title_mc1._x - 1;
}
if (title_mc1._x == 31) {
title_mc1.removeMovieClip();
title_mask1.removeMovieClip();
title_mc._x = 31;
def = true;
}
}
title_mc1.removeMovieClip();
title_mask1.removeMovieClip();
title_mc.musicname.htmlText = (("<b>" + txtword) + "</b> - ") + txtword2;
title_mc.setMask(title_mask);
txtwidth = title_mc.musicname.textWidth + 10;
maskwidth = title_mask._width;
title_mc.musicname._width = txtwidth;
title_mc._x = 31;
def = true;
if (txtwidth >= maskwidth) {
this.onEnterFrame = function () {
TxtScroll();
};
} else {
delete this.onEnterFrame;
title_mc._x = 31;
}
}
Stage.align = "TL";
Stage.scaleMode = "noScale";
Stage.showMenu = false;
if (XmlUrl == undefined) {
var url = _root._url;
var lastI = url.lastIndexOf("/");
var sss = url.substring(url.lastIndexOf("/", lastI - 1) + 1, lastI);
var array = sss.split("_");
MyColor = "0x" + array[0];
XmlUrl = (("http://www.wodemp3.com/wode_feed/" + array[1]) + "/") + array[2];
if (array[3] == "1") {
auto = true;
} else {
auto = false;
}
auto = false;
}
_root.porcess_mc._visible = false;
_root.tips_mc2._visible = false;
_root.title_mask._visible = false;
_root.player.setVol(100);
var player;
player = new Player();
player.setClientMode(2);
_root.owner = player;
var eventObj1 = new Object();
var eventObj2 = new Object();
player.addEventListener("onLoadedXML", eventObj1);
eventObj1.onLoadedXML = function (obj) {
var _local3 = _root.player.getCurrentIdx();
var _local2;
_local2 = _root.player.getPlaylist();
_root.txtword = _local2[_local3].title;
_root.txtword2 = _local2[_local3].artist;
_root.titleGoGoGo();
_root.startplay();
};
_root.owner.addEventListener("onBuffering", eventObj1);
eventObj1.onBuffering = function (obj) {
var _local3 = _root.player.getCurrentIdx();
var _local2;
_local2 = _root.player.getPlaylist();
_root.txtword2 = _local2[_local3].artist;
_root.titleGoGoGo();
_root.test.text = _local2[_local3].playurl;
_root.porcess_mc._visible = true;
loadedNum = _root.player.getBufferProgress();
_root.porcess_mc._x = (loadedNum / 100) * 1.6;
_root.porcess_mc.buffP.text = Math.round(loadedNum / 100) + "%";
if (loadedNum >= 10000) {
_root.porcess_mc._visible = false;
}
};
player.addEventListener("onStartPlay", eventObj2);
eventObj2.onStartPlay = function (obj) {
var _local2 = _root.player.getCurrentIdx();
var _local3;
_local3 = _root.player.getPlaylist();
_root.txtword = _local3[_local2].title;
_root.titleGoGoGo();
_root.textMove();
_root.playpause_mc.gotoAndStop(2);
};
_root.owner.addEventListener("hasSound", eventObj1);
eventObj1.hasSound = function (obj) {
var _local3 = _root.player.getCurrentIdx();
var _local2;
_local2 = _root.player.getPlaylist();
_root.porcess_mc._visible = true;
loadedNum = _root.player.getBufferProgress();
_root.porcess_mc._x = (loadedNum / 100) * 1.6;
_root.porcess_mc.buffP.text = Math.round(loadedNum / 100) + "%";
if (loadedNum >= 10000) {
_root.porcess_mc._visible = false;
}
};
_root.player.loadTrack(_root.XmlUrl, false);
player.addEventListener("onPause", eventObj1);
eventObj1.onPause = function (obj) {
_root.txtword2 = "\u505C\u6B62";
_root.titleGoGoGo();
_root.playpause_mc.gotoAndStop(1);
};
player.addEventListener("onAfterPlay", eventObj1);
eventObj1.onAfterPlay = function (obj) {
_root.player.nextTrack(false);
};
player.addEventListener("onErrorLink", eventObj1);
eventObj1.onErrorLink = function (obj) {
_root.txtword2 = "\u5F88\u62B1\u6B49,\u627E\u4E0D\u5230\u8FD9\u9996\u6B4C";
_root.titleGoGoGo();
_root.player.stopTrack();
};
player.addEventListener("onErrorXML", eventObj1);
eventObj1.onErrorXML = function (obj) {
_root.txtword2 = "\u8BFB\u53D6XML\u5931\u8D25\uFF01";
_root.titleGoGoGo();
};
Instance of Symbol 37 MovieClip "tips_mc2" in Frame 1
on (rollOver) {
_root.tips_mc2._visible = true;
}
on (release) {
var idx = _root.player.getCurrentIdx();
var playlist;
playlist = _root.player.getPlaylist();
_root.thisUrl = playlist[idx].weburl;
System.setClipboard(_root.thisUrl);
_root.tips_mc2.gotoAndStop(2);
_root.tips_mc2.onEnterFrame = function () {
_root.tips_mc2._alpha = _root.tips_mc2._alpha - 1;
if (_root.tips_mc2._alpha <= 0) {
_root.tips_mc2._visible = false;
_root.tips_mc2.onEnterFrame = undefind;
}
};
}
on (rollOut) {
_root.tips_mc2._visible = false;
}
Symbol 2 MovieClip Frame 1
var btncolor = new Color(this);
btncolor.setRGB(_root.MyColor);
Symbol 16 MovieClip Frame 1
var btncolor = new Color(this);
btncolor.setRGB(_root.MyColor);
Symbol 17 Button
on (release) {
var idx = _root.player.getCurrentIdx();
var playlist;
playlist = _root.player.getPlaylist();
_root.txtword = playlist[idx].title;
_root.txtword2 = playlist[idx].artist;
_root.titleGoGoGo();
_root.player.playTrack(idx);
gotoAndStop (2);
}
Symbol 22 MovieClip Frame 1
var btncolor = new Color(this);
btncolor.setRGB(_root.mycolor);
Symbol 23 Button
on (release) {
_root.player.pauseTrack();
gotoAndStop (1);
}
Symbol 24 MovieClip Frame 1
stop();
Symbol 26 Button
on (release) {
var idx = _root.player.getCurrentIdx();
var playlist;
playlist = _root.player.getPlaylist();
_root.thisUrl = playlist[idx].weburl;
getURL (_root.thisUrl, "_blank");
}
on (rollOver) {
_root.tips_mc2.onEnterFrame = undefind;
_root.tips_mc2._visible = true;
_root.tips_mc2._alpha = 100;
_root.tips_mc2.gotoAndStop(1);
_root.tips_mc2._x = 80;
_root.tips_mc2._y = 9;
}
on (rollOut) {
_root.tips_mc2._visible = false;
}
Symbol 37 MovieClip Frame 1
stop();
Symbol 38 MovieClip [__Packages.Player] Frame 0
class Player
{
var playlistXML, commentXML, scoreXML, listenXML, radioXML, loaded_mp3, loaded_sounds, myPlaylist, myComments, myScores, myListens, songAttrObj, songListAttrObj, radioAttrObj, commentsAttrObj, scoresAttrObj, listensAttrObj, radioCommentsXML, radioCommentsList, radioCommentsAttrObj, isPlaylist, myPlayerMode, myClientMode, tf, incArray, eventObj1, myDomain, mySound, lrcShow, dispatchEvent, nowLRC;
function Player () {
mx.events.EventDispatcher.initialize(this);
playlistXML = new XML();
commentXML = new XML();
scoreXML = new XML();
listenXML = new XML();
radioXML = new XML();
loaded_mp3 = new Array();
loaded_sounds = new Array();
myPlaylist = new Array();
myComments = new Array();
myScores = new Array();
myListens = new Array();
songAttrObj = new Object();
songListAttrObj = new Object();
radioAttrObj = new Object();
commentsAttrObj = new Object();
scoresAttrObj = new Object();
listensAttrObj = new Object();
radioCommentsXML = new XML();
radioCommentsList = new Array();
radioCommentsAttrObj = new Object();
isPlaylist = true;
myPlayerMode = 0;
myClientMode = 0;
tf = new TextField();
incArray = new Array();
eventObj1 = new Object();
var _local3 = _root._url;
var _local4 = _local3.substring(_local3.indexOf(":") + 3, _local3.length);
myDomain = _local4.substring(0, _local4.indexOf("/"));
}
function addEventListener() {
}
function removeEventListener() {
}
function resetPlayer() {
mx.events.EventDispatcher.initialize(this);
playlistXML = new XML();
commentXML = new XML();
scoreXML = new XML();
listenXML = new XML();
radioXML = new XML();
loaded_mp3 = new Array();
loaded_sounds = new Array();
myPlaylist = new Array();
myComments = new Array();
myScores = new Array();
myListens = new Array();
songAttrObj = new Object();
songListAttrObj = new Object();
radioAttrObj = new Object();
commentsAttrObj = new Object();
scoresAttrObj = new Object();
listensAttrObj = new Object();
radioCommentsXML = new XML();
radioCommentsList = new Array();
radioCommentsAttrObj = new Object();
isPlaylist = true;
myPlayerMode = 0;
myClientMode = 0;
tf = new TextField();
incArray = new Array();
eventObj1 = new Object();
var _local3 = _root._url;
var _local4 = _local3.substring(_local3.indexOf(":") + 3, _local3.length);
myDomain = _local4.substring(0, _local4.indexOf("/"));
}
function setClientMode(m) {
myClientMode = m;
}
function deleteSongs() {
mySound.stop();
delete mySound;
var _local2 = 0;
while (_local2 < loaded_sounds.length) {
delete loaded_sounds[_local2];
_local2++;
}
loaded_sounds = new Array();
loaded_mp3 = new Array();
}
function loadTrack(playlist_xml, isPlayList) {
clearPlaylist();
if (isPlayList) {
myPlayerMode = 1;
} else {
myPlayerMode = 2;
}
deleteSongs();
var owner = this;
owner.isPlaylist = isPlayList;
playlistXML.ignoreWhite = true;
playlistXML.onLoad = function (success) {
if (success) {
if ((owner.myPlayerMode == 1) || (owner.isPlaylist)) {
owner.parseXML_list();
} else if ((owner.myPlayerMode == 2) || (!owner.isPlaylist)) {
owner.parseXML_single();
}
} else {
var _local1 = new Object();
_local1.type = "onErrorXML";
_local1.target = owner;
owner.dispatchEvent(_local1);
}
};
playlistXML.load(playlist_xml);
stop();
}
function loadComment(comment_xml) {
myPlayerMode = 4;
clearComments();
deleteSongs();
var owner = this;
commentXML.ignoreWhite = true;
commentXML.onLoad = function (success) {
if (success) {
owner.parseXML_comment();
} else {
var _local1 = new Object();
_local1.type = "onErrorXML_comment";
_local1.target = owner;
owner.dispatchEvent(_local1);
}
};
commentXML.load(comment_xml);
stop();
}
function loadScore(score_xml) {
myPlayerMode = 5;
clearScores();
deleteSongs();
var owner = this;
scoreXML.ignoreWhite = true;
scoreXML.onLoad = function (success) {
if (success) {
owner.parseXML_score();
} else {
var _local1 = new Object();
_local1.type = "onErrorXML_score";
_local1.target = owner;
owner.dispatchEvent(_local1);
}
};
scoreXML.load(score_xml);
stop();
}
function loadListen(listen_xml) {
myPlayerMode = 6;
clearListens();
deleteSongs();
var owner = this;
listenXML.ignoreWhite = true;
listenXML.onLoad = function (success) {
if (success) {
owner.parseXML_listen();
} else {
var _local1 = new Object();
_local1.type = "onErrorXML_listen";
_local1.target = owner;
owner.dispatchEvent(_local1);
}
};
listenXML.load(listen_xml);
stop();
}
function loadRadio(radio_xml) {
myPlayerMode = 3;
clearPlaylist();
deleteSongs();
var owner = this;
radioXML.ignoreWhite = true;
radioXML.onLoad = function (success) {
if (success) {
owner.parseXML_radio();
} else {
var _local1 = new Object();
_local1.type = "onErrorXML_radio";
_local1.target = owner;
owner.dispatchEvent(_local1);
}
};
radioXML.load(radio_xml);
stop();
}
function loadRadioCommmets(commments_xml) {
clearCommentsList();
var owner = this;
radioCommentsXML.ignoreWhite = true;
radioCommentsXML.onLoad = function (success) {
if (success) {
owner.parseXML_radioComments();
} else {
var _local1 = new Object();
_local1.type = "onErrorXML_radioComments";
_local1.target = owner;
owner.dispatchEvent(_local1);
}
};
radioCommentsXML.load(commments_xml);
stop();
}
function loadsound(songplayurl, lyricurl, tf) {
loadSoundError = false;
mySound.stop();
deleteSongs();
var _local4 = false;
var _local5 = 0;
var owner = this;
var _local2 = 0;
while (_local2 < loaded_mp3.length) {
if (loaded_mp3[_local2] eq songplayurl) {
_local4 = true;
_local5 = _local2;
break;
}
_local2++;
}
if (!_local4) {
startPlay = false;
songIsLoading = false;
played = 0;
myPause = false;
myStop = false;
mySound = new Sound();
mySound.onLoad = function (success) {
if (success) {
} else {
owner.loadSoundError = true;
var _local1 = new Object();
_local1.type = "onErrorLink";
_local1.target = owner;
owner.dispatchEvent(_local1);
}
};
mySound.loadSound(songplayurl, true);
lrcShow = new LRCShow(tf, lyricurl, mySound, incArray);
if (!loadSoundError) {
beginInterval(owner);
loaded_mp3[loaded_num] = songplayurl;
loaded_sounds[loaded_num] = mySound;
loaded_num++;
}
var _local3 = new Object();
_local3.type = "onSongIsLoading";
_local3.target = this;
owner.dispatchEvent(_local3);
} else {
played = 0;
myPause = false;
myStop = false;
mySound = loaded_sounds[_local5];
lrcShow = new LRCShow(tf, lyricurl, mySound, incArray);
beginInterval(owner);
mySound.start();
var _local3 = new Object();
_local3.type = "onSongIsLoading";
_local3.target = this;
owner.dispatchEvent(_local3);
_local3 = new Object();
_local3.type = "onStartPlay";
_local3.target = this;
owner.dispatchEvent(_local3);
}
}
function parseXML_single() {
var _local4 = playlistXML.firstChild;
while (_local4 != null) {
if (_local4.nodeName == "song") {
var _local3 = new Object();
var _local2 = _local4.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "intro") {
songAttrObj.intro = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "id") {
_local3.id = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "title") {
_local3.title = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "weburl") {
_local3.weburl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "playurl") {
_local3.playurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "artist") {
_local3.artist = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "artisturl") {
_local3.artisturl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "album") {
_local3.album = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "albumpic") {
_local3.albumpic = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "albumurl") {
_local3.albumurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "playcount") {
_local3.playcount = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "lyricurl") {
_local3.lyricurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "commentsurl") {
_local3.commentsurl = _local2.firstChild.nodeValue;
}
_local2 = _local2.nextSibling;
}
myPlaylist.push(_local3);
}
_local4 = _local4.nextSibling;
}
var _local5 = new Object();
_local5.type = "onLoadedXML";
_local5.target = this;
dispatchEvent(_local5);
}
function parseXML_list() {
var _local5 = playlistXML.firstChild;
songListAttrObj.param = _local5.attributes.param;
songListAttrObj.count = _local5.attributes.count;
songListAttrObj.intro = _local5.attributes.intro;
songListAttrObj.cover = _local5.attributes.cover;
songListAttrObj.topicname = _local5.attributes.topicname;
songListAttrObj.author = _local5.attributes.author;
var _local4 = _local5.firstChild;
while (_local4 != null) {
if (_local4.nodeName == "song") {
var _local3 = new Object();
var _local2 = _local4.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "id") {
_local3.id = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "title") {
_local3.title = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "weburl") {
_local3.weburl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "playurl") {
_local3.playurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "artist") {
_local3.artist = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "artisturl") {
_local3.artisturl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "album") {
_local3.album = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "albumpic") {
_local3.albumpic = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "albumurl") {
_local3.albumurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "playcount") {
_local3.playcount = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "lyricurl") {
_local3.lyricurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "commentsurl") {
_local3.commentsurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "illustration") {
_local3.illustration = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "musicinfo") {
_local3.musicinfo = _local2.firstChild.nodeValue;
}
_local2 = _local2.nextSibling;
}
myPlaylist.push(_local3);
}
_local4 = _local4.nextSibling;
}
var _local6 = new Object();
_local6.type = "onLoadedXML";
_local6.target = this;
dispatchEvent(_local6);
}
function parseXML_comment() {
var _local5 = commentXML.firstChild;
commentsAttrObj.username = _local5.attributes.username;
commentsAttrObj.userpic = _local5.attributes.userpic;
commentsAttrObj.userweburl = _local5.attributes.userweburl;
var _local4 = _local5.firstChild;
while (_local4 != null) {
if (_local4.nodeName == "comment") {
var _local3 = new Object();
var _local2 = _local4.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "content") {
_local3.content = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "date") {
_local3.date = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songid") {
_local3.songid = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songtitle") {
_local3.songtitle = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songpic") {
_local3.songpic = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songweburl") {
_local3.songweburl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songplayurl") {
_local3.songplayurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "lyricurl") {
_local3.lyricurl = _local2.firstChild.nodeValue;
}
_local2 = _local2.nextSibling;
}
myComments.push(_local3);
}
_local4 = _local4.nextSibling;
}
var _local6 = new Object();
_local6.type = "onLoadedXML_comment";
_local6.target = this;
dispatchEvent(_local6);
}
function parseXML_score() {
var _local5 = scoreXML.firstChild;
scoresAttrObj.username = _local5.attributes.username;
scoresAttrObj.userpic = _local5.attributes.userpic;
scoresAttrObj.userweburl = _local5.attributes.userweburl;
var _local4 = _local5.firstChild;
while (_local4 != null) {
if (_local4.nodeName == "score") {
var _local3 = new Object();
var _local2 = _local4.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "scorenum") {
_local3.scorenum = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "date") {
_local3.date = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songid") {
_local3.songid = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songtitle") {
_local3.songtitle = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songpic") {
_local3.songpic = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songweburl") {
_local3.songweburl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songplayurl") {
_local3.songplayurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "lyricurl") {
_local3.lyricurl = _local2.firstChild.nodeValue;
}
_local2 = _local2.nextSibling;
}
myScores.push(_local3);
}
_local4 = _local4.nextSibling;
}
var _local6 = new Object();
_local6.type = "onLoadedXML_score";
_local6.target = this;
dispatchEvent(_local6);
}
function parseXML_listen() {
var _local5 = listenXML.firstChild;
listensAttrObj.username = _local5.attributes.username;
listensAttrObj.userpic = _local5.attributes.userpic;
listensAttrObj.userweburl = _local5.attributes.userweburl;
var _local4 = _local5.firstChild;
while (_local4 != null) {
if (_local4.nodeName == "listen") {
var _local3 = new Object();
var _local2 = _local4.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "date") {
_local3.date = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songid") {
_local3.songid = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songpic") {
_local3.songpic = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songtitle") {
_local3.songtitle = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songweburl") {
_local3.songweburl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "songplayurl") {
_local3.songplayurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "lyricurl") {
_local3.lyricurl = _local2.firstChild.nodeValue;
}
_local2 = _local2.nextSibling;
}
myListens.push(_local3);
}
_local4 = _local4.nextSibling;
}
var _local6 = new Object();
_local6.type = "onLoadedXML_listen";
_local6.target = this;
dispatchEvent(_local6);
}
function parseXML_radio() {
var _local6 = radioXML.firstChild;
radioAttrObj.type = _local6.attributes.type;
radioAttrObj.param = _local6.attributes.param;
radioAttrObj.nexturl = _local6.attributes.nexturl;
radioAttrObj.intro = _local6.firstChild.firstChild.nodeValue;
var _local5 = _local6.firstChild.nextSibling;
var _local4 = _local5.firstChild;
while (_local4 != null) {
if (_local4.nodeName == "song") {
var _local3 = new Object();
var _local2 = _local4.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "id") {
_local3.id = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "title") {
_local3.title = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "weburl") {
_local3.weburl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "playurl") {
_local3.playurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "lyricurl") {
_local3.lyricurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "artist") {
_local3.artist = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "artisturl") {
_local3.artisturl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "album") {
_local3.album = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "albumpic") {
_local3.albumpic = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "albumurl") {
_local3.albumurl = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "playcount") {
_local3.playcount = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "commentsurl") {
_local3.commentsurl = _local2.firstChild.nodeValue;
}
_local2 = _local2.nextSibling;
}
myPlaylist.push(_local3);
}
_local4 = _local4.nextSibling;
}
var _local7 = new Object();
_local7.type = "onLoadedXML_radio";
_local7.target = this;
dispatchEvent(_local7);
}
function parseXML_radioComments() {
var _local5 = radioCommentsXML.firstChild;
radioCommentsAttrObj.weburl = _local5.attributes.weburl;
var _local4 = _local5.firstChild;
while (_local4 != null) {
if (_local4.nodeName == "comment") {
var _local3 = new Object();
var _local2 = _local4.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "content") {
_local3.content = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "date") {
_local3.date = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "username") {
_local3.username = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "userpic") {
_local3.userpic = _local2.firstChild.nodeValue;
}
if (_local2.nodeName == "userurl") {
_local3.userurl = _local2.firstChild.nodeValue;
}
_local2 = _local2.nextSibling;
}
radioCommentsList.push(_local3);
}
_local4 = _local4.nextSibling;
}
var _local6 = new Object();
_local6.type = "onLoadedXML_radioComments";
_local6.target = this;
dispatchEvent(_local6);
}
function prevTrack(rd) {
if (myPlayerMode == 4) {
id = ((id == 0) ? (myComments.length - 1) : (id - 1));
} else if (myPlayerMode == 5) {
id = ((id == 0) ? (myScores.length - 1) : (id - 1));
} else if (myPlayerMode == 6) {
id = ((id == 0) ? (myListens.length - 1) : (id - 1));
} else if (rd == true) {
id = random(myPlaylist.length);
} else {
id = ((id == 0) ? (myPlaylist.length - 1) : (id - 1));
}
myPause = false;
playTrack(id);
}
function nextTrack(rd) {
if (myPlayerMode == 4) {
id = ((id == (myComments.length - 1)) ? 0 : (id + 1));
} else if (myPlayerMode == 5) {
id = ((id == (myScores.length - 1)) ? 0 : (id + 1));
} else if (myPlayerMode == 6) {
id = ((id == (myListens.length - 1)) ? 0 : (id + 1));
} else if (rd == true) {
id = random(myPlaylist.length);
} else {
id = ((id == (myPlaylist.length - 1)) ? 0 : (id + 1));
}
myPause = false;
playTrack(id);
}
function stopTrack() {
if (!myStop) {
mySound.stop();
played = 0;
myStop = true;
myPause = false;
var _local2 = new Object();
_local2.type = "onStop";
_local2.target = this;
dispatchEvent(_local2);
}
}
function playTrack(idx) {
id = idx;
var _local7 = new LoadVars();
_local7.load(((((("http://" + myDomain) + "/song/log/") + getCurrentID()) + "?type=") + myClientMode) + "0");
var _local3 = 0;
while (_local3 < incArray.length) {
var _local6 = incArray.pop();
if (_local6 > 10000) {
_local6 = _local6 - 10000;
clearInterval(_local6);
}
_local3++;
}
if (myPlayerMode == 4) {
if ((!myPause) || (lastSoundID != idx)) {
nowLRC = myComments[idx].lyricurl;
loadsound(myComments[idx].songplayurl, myComments[idx].lyricurl, tf);
}
} else if (myPlayerMode == 5) {
if ((!myPause) || (lastSoundID != idx)) {
nowLRC = myScores[idx].lyricurl;
loadsound(myScores[idx].songplayurl, myScores[idx].lyricurl, tf);
}
} else if (myPlayerMode == 6) {
if ((!myPause) || (lastSoundID != idx)) {
nowLRC = myListens[idx].lyricurl;
loadsound(myListens[idx].songplayurl, myListens[idx].lyricurl, tf);
}
} else if (myPlayerMode == 3) {
if (!myPause) {
nowLRC = myPlaylist[idx].lyricurl;
loadsound(myPlaylist[idx].playurl, myPlaylist[idx].lyricurl, tf);
}
} else if ((!myPause) || (lastSoundID != idx)) {
nowLRC = myPlaylist[idx].lyricurl;
loadsound(myPlaylist[idx].playurl, myPlaylist[idx].lyricurl, tf);
}
lastSoundID = idx;
var owner = this;
mySound.onSoundComplete = function () {
var _local2 = 0;
while (_local2 < owner.incArray.length) {
var _local1 = owner.incArray.pop();
if (_local1 > 10000) {
_local1 = _local1 - 10000;
clearInterval(_local1);
}
_local2++;
}
var _local4 = new LoadVars();
_local4.load(((((("http://" + owner.myDomain) + "/song/log/") + owner.getCurrentID()) + "?type=") + owner.myClientMode) + "1");
var _local3 = new Object();
_local3.type = "onAfterPlay";
_local3.target = owner;
owner.dispatchEvent(_local3);
};
if (myPause) {
mySound.start(played / 1000, 1);
lrcShow = new LRCShow(tf, nowLRC, mySound, incArray);
}
myPause = false;
isStarted = true;
}
function pauseTrack() {
played = mySound.position;
mySound.stop();
myPause = true;
if (!isStarted) {
myPause = false;
isStarted = true;
}
var _local2 = new Object();
_local2.type = "onPause";
_local2.target = this;
dispatchEvent(_local2);
}
function getPosition() {
return(mySound.position);
}
function getDuration() {
var _local2 = (mySound.duration * mySound.getBytesTotal()) / mySound.getBytesLoaded();
return(_local2);
}
function setVol(vol) {
mySound.setVolume(vol);
}
function getVol() {
var _local2 = mySound.getVolume();
return(_local2);
}
function mute() {
mySound.setVolume(0);
}
function getBufferProgress() {
var _local2 = int((mySound.getBytesLoaded() * 10000) / mySound.getBytesTotal());
return(_local2);
}
function getEstimatedProgress() {
var _local2 = int((mySound.getBytesLoaded() * 10000) / 50000);
return(_local2);
}
function inspireONBuffering(owner) {
if (mySound.getBytesLoaded() > 50000) {
if (getBufferProgress() >= 10000) {
clearInterval(intervalId);
}
if (!owner.startPlay) {
var _local2 = new Object();
_local2.type = "onStartPlay";
_local2.target = this;
owner.dispatchEvent(_local2);
}
owner.startPlay = true;
var _local2 = new Object();
_local2.type = "hasSound";
_local2.target = this;
owner.dispatchEvent(_local2);
} else {
if (!owner.songIsLoading) {
}
owner.songIsLoading = true;
var _local2 = new Object();
_local2.type = "onBuffering";
_local2.target = this;
owner.dispatchEvent(_local2);
}
}
function beginInterval(owner) {
if (intervalId != null) {
clearInterval(intervalId);
}
intervalId = setInterval(this, "inspireONBuffering", duration, owner);
}
function getCurrentArtist() {
var _local2;
_local2 = String(myPlaylist[id].artist);
return(_local2);
}
function getCurrentTitle() {
var _local2;
_local2 = String(myPlaylist[id].title);
return(_local2);
}
function getCurrentID() {
var _local2;
if (myPlayerMode == 4) {
_local2 = String(myComments[id].songid);
} else if (myPlayerMode == 5) {
_local2 = String(myScores[id].songid);
} else if (myPlayerMode == 6) {
_local2 = String(myListens[id].songid);
} else {
_local2 = String(myPlaylist[id].id);
}
return(_local2);
}
function isPlaying() {
if ((!myStop) && (!myPause)) {
return(true);
}
return(false);
}
function getCurrentIdx() {
return(id);
}
function getPlayerMode() {
return(myPlayerMode);
}
function getLrcLoaded() {
var _local2 = getCurrentIdx();
if (myPlayerMode == 4) {
if (!(myComments[_local2].lyricurl === null)) {
return(true);
}
return(false);
}
if (myPlayerMode == 5) {
if (myScores[_local2].lyricurl != null) {
return(true);
}
return(false);
}
if (myPlayerMode == 6) {
if (myListens[_local2].lyricurl != null) {
return(true);
}
return(false);
}
if (myPlaylist[_local2].lyricurl != null) {
return(true);
}
return(false);
}
function getPlaylist() {
return(myPlaylist);
}
function clearPlaylist() {
myPlaylist = new Array();
}
function getComments() {
return(myComments);
}
function clearComments() {
myComments = new Array();
}
function getScores() {
return(myScores);
}
function clearScores() {
myScores = new Array();
}
function getListens() {
return(myListens);
}
function clearListens() {
myListens = new Array();
}
function getRadioAttrObj() {
return(radioAttrObj);
}
function getCommentsAttrObj() {
return(commentsAttrObj);
}
function getScoresAttrObj() {
return(scoresAttrObj);
}
function getListensAttrObj() {
return(listensAttrObj);
}
function getSongAttrObj() {
return(songAttrObj);
}
function getSongListAttrObj() {
return(songListAttrObj);
}
function getCommentsList() {
return(radioCommentsList);
}
function clearCommentsList() {
radioCommentsList = new Array();
}
function getRadioCommentsAttrObj() {
return(radioCommentsAttrObj);
}
function setMyPause2F() {
myPause = false;
}
function setPlayerMode(num) {
if ((num > 0) && (num < 7)) {
myPlayerMode = num;
} else {
myPlayerMode = 0;
}
}
function setPlayerTF(tfInFlash) {
tf = tfInFlash;
}
var id = 0;
var played = 0;
var isStarted = false;
var myStop = false;
var myPause = false;
var loaded_num = 0;
var blnAutoStart = false;
var intervalId = 0;
var duration = 200;
var loadSoundError = false;
var lastSoundID = 0;
var startPlay = false;
var songIsLoading = false;
}
Symbol 39 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 40 MovieClip [__Packages.LRCShow] Frame 0
class LRCShow
{
var myTF, myIncArray, lrcLoaded;
function LRCShow (tf, lrc, My_Mp3, incArray) {
myTF = tf;
myIncArray = incArray;
tf.autoSize = true;
tf.html = true;
tf.selectable = false;
tf.multiline = true;
tf.wordWrap = true;
if (lrc != undefined) {
Load(tf, lrc, My_Mp3, incArray);
}
}
function addEventListener() {
}
function removeEventListener() {
}
function Load(tf, url, My_Mp3) {
var my_lv = new LoadVars();
var owner = this;
my_lv.onLoad = function (success) {
if (success) {
var _local6 = my_lv;
var _local5 = unescape(my_lv.toString());
var _local4 = Lrc.Replace(_local5, "=&onLoad=[type Function]", "");
var _local2 = {};
_local2 = Lrc.Parse(_local4);
var _local3 = 0;
_local3 = setInterval(owner, "test", 1000, owner.myTF, _local2, My_Mp3);
this.incInLRCShow = _local3 + 10000;
owner.myIncArray.push(this.incInLRCShow);
this.lrcLoaded = true;
} else {
this.lrcLoaded = false;
}
};
my_lv.load(url);
}
function test(tf, lrc, My_Mp3) {
var _local2 = 0;
while ((My_Mp3.position - (lrc.stime[_local2] * 1000)) > 0) {
_local2++;
}
_local2--;
var _local3 = "<P align='center'>";
var _local6 = Math.max(_local2 - 3, 0);
var _local5 = Math.max(Math.min(_local2 + 4, lrc.msg.length), 7);
var _local1 = _local6;
while (_local1 < _local5) {
if (_local1 == _local2) {
_local3 = _local3 + (("<FONT color=\"#333333\"><b>" + lrc.msg[_local1]) + "</b></FONT><BR/>");
} else {
_local3 = _local3 + (lrc.msg[_local1] + "<BR/>");
}
_local1++;
}
tf.htmlText = _local3.slice(0, _local3.length - 3) + "</P>";
_local2++;
if (_local2 >= lrc.msg.length) {
tf.htmlText = tf.htmlText + "<---\u66F2\u7EC8--->";
}
}
function getLrcLoaded() {
return(lrcLoaded);
}
var incInLRCShow = 0;
}
Symbol 41 MovieClip [__Packages.Lrc] Frame 0
class Lrc extends LoadVars
{
function Lrc (url) {
super();
}
static function Parse(lrcdata) {
var _local3 = {stime:[], msg:[], long:[], ti:"\u66F2\u76EE\u540D\u79F0", ar:"\u827A\u672F\u5BB6", al:"\u4E13\u8F91\u540D\u79F0", by:"\u6B4C\u8BCD\u5236\u4F5C"};
var _local10 = lrcdata.split("\r\n");
var _local11 = _local10.length;
var _local4 = 0;
var _local8 = 0;
while (_local8 < _local11) {
var _local9 = Replace(_local10[_local8], "[", "");
var _local2 = _local9.split("]");
var _local7 = _local2.length;
var _local1 = 0;
while (_local1 < (_local7 - 1)) {
_local2[_local1] = Replace(_local2[_local1], "\uFF1A", ":");
if (_local2[_local1].indexOf("ti:") != -1) {
_local3.ti = Replace(_local2[_local1], "ti:", "");
} else if (_local2[_local1].indexOf("ar:") != -1) {
_local3.ar = Replace(_local2[_local1], "ar:", "");
} else if (_local2[_local1].indexOf("al:") != -1) {
_local3.al = Replace(_local2[_local1], "al:", "");
} else if (_local2[_local1].indexOf("by:") != -1) {
_local3.by = Replace(_local2[_local1], "by:", "");
} else if (_local2[_local1].indexOf("offset:") != -1) {
_local3.offset = Replace(_local2[_local1], "offset:", "");
} else if (_local2[_local1].indexOf("t_time:") != -1) {
_local3.t_time = Replace(_local2[_local1], "t_time:", "");
} else {
var _local6 = Time2Ten(_local2[_local1]);
var _local5 = trim(_local2[_local7 - 1]);
_local3.stime[_local4] = _local6;
_local3.msg[_local4] = _local5;
_local3.long[_local4] = Str_Length(_local5);
_local4++;
}
_local1++;
}
_local8++;
}
_local3 = Order(_local3);
return(_local3);
}
static function trim(myString) {
if ((myString.indexOf(" ") == -1) && (myString.indexOf("\u3000") == -1)) {
return(myString);
}
var _local5 = myString;
myString = replace(myString, "\u3000", " ");
var _local3 = 0;
var _local4 = 0;
var _local2 = 0;
while (_local2 < myString.length) {
if (myString.charAt(_local2) != " ") {
break;
}
_local3++;
_local2++;
}
_local2 = myString.length - 1;
while (_local2 > 0) {
if (myString.charAt(_local2) != " ") {
break;
}
_local4++;
_local2--;
}
return(_local5.substring(_local3, _local5.length - _local4));
}
static function replace(s, o, n) {
s = s.split(o).join(n);
return(s.split(o).join(n));
}
static function Replace(target_str, replace_str, instead_str) {
var _local3 = target_str.split(replace_str);
var _local4 = _local3.length;
target_str = "";
var _local1 = 0;
while (_local1 < _local4) {
if (_local1 == 0) {
target_str = target_str + _local3[_local1];
} else {
target_str = target_str + (instead_str + _local3[_local1]);
}
_local1++;
}
return(target_str);
}
static function Time2Ten(str) {
var _local2 = 0;
var _local4 = str.split(":");
var _local3 = _local4.length;
var _local1 = 0;
while (_local1 < _local3) {
_local2 = _local2 + (_local4[_local1] * NxN(60, _local3 - (_local1 + 1)));
_local1++;
}
return(_local2);
}
static function NxN(num, n) {
var _local2 = 1;
var _local1 = 0;
while (_local1 < n) {
_local2 = _local2 * num;
_local1++;
}
return(_local2);
}
static function Order(lrc) {
var _local4 = lrc.stime;
var _local6 = lrc.msg;
var _local5 = lrc.long;
var _local7 = _local4.length;
var _local1 = 0;
while (_local1 < _local7) {
var _local2 = _local1;
var _local3 = _local1 + 1;
while (_local3 < (_local7 + 1)) {
if (_local4[_local2] > _local4[_local3]) {
_local2 = _local3;
}
_local3++;
}
var _local8 = _local4[_local1];
_local4[_local1] = _local4[_local2];
_local4[_local2] = _local8;
var _local10 = _local6[_local1];
_local6[_local1] = _local6[_local2];
_local6[_local2] = _local10;
var _local9 = _local5[_local1];
_local5[_local1] = _local5[_local2];
_local5[_local2] = _local9;
_local1++;
}
return(lrc);
}
static function Str_Length(str) {
var _local3 = str.split("");
var _local2 = 0;
var _local1 = 0;
while (_local1 < _local3.length) {
if (_local1 != 0) {
if (IsChinese(_local3[_local1])) {
_local2 = _local2 + 12;
} else {
_local2 = _local2 + 6;
}
} else if (IsChinese(_local3[_local1])) {
_local2 = 16.2;
} else {
_local2 = 10.2;
}
_local1++;
}
return(_local2);
}
static function IsChinese(target_str) {
var _local1 = "";
var _local2 = 0;
while (_local2 < 10) {
_local1 = _local1 + String.fromCharCode(_local2 + 48);
_local2++;
}
_local2 = 10;
while (_local2 < 36) {
_local1 = _local1 + String.fromCharCode(_local2 + 55);
_local2++;
}
_local2 = 36;
while (_local2 < 62) {
_local1 = _local1 + String.fromCharCode(_local2 + 61);
_local2++;
}
_local2 = 62;
while (_local2 < 78) {
_local1 = _local1 + String.fromCharCode(_local2 - 30);
_local2++;
}
_local2 = 58;
while (_local2 < 65) {
_local1 = _local1 + String.fromCharCode(_local2);
_local2++;
}
_local2 = 91;
while (_local2 < 97) {
_local1 = _local1 + String.fromCharCode(_local2);
_local2++;
}
_local2 = 123;
while (_local2 < 127) {
_local1 = _local1 + String.fromCharCode(_local2);
_local2++;
}
if (_local1.indexOf(target_str) != -1) {
return(false);
}
return(true);
}
}