OnJava8-Examples/gui/flex/songScript.as
2015-04-20 15:36:01 -07:00

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;
} ///:~