23 lines
521 B
ActionScript
23 lines
521 B
ActionScript
//: gui/flex/songScript.as
|
|
function getSongs() {
|
|
songService.getSongs();
|
|
}
|
|
|
|
function selectSong(event) {
|
|
var song = songGrid.getItemAt(event.itemIndex);
|
|
showSongInfo(song);
|
|
}
|
|
|
|
function showSongInfo(song) {
|
|
songInfo.text = song.name + newline;
|
|
songInfo.text += song.artist + newline;
|
|
songInfo.text += song.album + newline;
|
|
albumImage.source = song.albumImageUrl;
|
|
songPlayer.contentPath = song.songMediaUrl;
|
|
songPlayer.visible = true;
|
|
}
|
|
|
|
function onSongs(songs) {
|
|
songGrid.dataProvider = songs;
|
|
} ///:~
|