Music Streams


Copy and paste the script:

// Title: Music Streams
//
//
integer dialogChannel = 19242; // dialog channel
list stationMenu;
list streams;
string stationURL;

init()
{
llListen(dialogChannel, “”, NULL_KEY, “”); // listen for dialog answers
llSetTouchText(“Music”);
//
stationMenu = [“Radio Nigel”,”Club”,”Demented”,”80s”,”Top 500″];

streams = [“http://stream.radionigel.com:8020/”%5D; // Radio Nigel
streams+= [“http://scfire-chi0l-2.stream.aol.com:80/stream/1065”%5D; // Club
streams+= [“http://64.202.98.102:8000”%5D; // Demented radio
streams+= [“http://scfire-dll-aa01.stream.aol.com:80/stream/1040”%5D; // 80s
streams+= [“http://scfire-dll-aa01.stream.aol.com:80/stream/1074”%5D; // Top 500

}

default
{
state_entry()
{
init();
}

on_rez(integer start_param)
{
init();
}

touch(integer touchCounter)
{
llDialog(llDetectedKey(0), “Click a button to choose a different internet radio station”, stationMenu, dialogChannel); // present dialog on click
}

listen(integer channel, string name, key id, string chosenStation)
{
if(channel == dialogChannel){

integer place;
place = llListFindList(stationMenu,[chosenStation]);
stationURL = llList2String(streams, place);

llSetParcelMusicURL(stationURL);

llSetText(“Now playing ” + chosenStation + “\n” + stationURL,<1,0,0>,1.0);

} // end if

}// end listen

}

Advertisements

2 responses to “Music Streams

  1. I am having problems with this script, also it is different from the one you have on SL. The one on SL has no compile errors yet the one here does.. Just letting you know while I try and figure this out…

  2. sorry Matt!

    The color vector in the llSetText was missing

    I’ve added it in this script, and tested it in SL!
    regards
    Benja

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s