cette page est en cours de rédaction / This page is under construction / página en construcción
back to LS in SL
The Pathe-Marconi Streaming Radio is a Second Life interface to the Locus Sonus Streaming Project. The interface takes the form of a vintage radio set in an environment similar to the one employed in When Airwaves Swing. The radio is flanked by vintage radio manuals, which give directions on the radio's use. When an avatar touches the radio, a dialog box opens, displaying the available streams. When a selection is made, the ambient sound in the local environment is replaced by that of the chosen real-life stream. The streams are real-time and represent many places around the world.
Realisation : Brett Ian Balogh (SAIC School of the Art Institute of Chicago
//Pathe-Marconi radio script by Brett Ian Balogh/Laszlo Zsigmond
//Version 1.2 | Added support for paris and two marseille streams
list menu=["Amsterdam", "Boston", "Chicago", "Chicago_2", "Marseille", "Marseille_2",
"Oslo", "Paris", "Santa_Barbara", "Solleftea", "Stanford"];
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
llSetText("Pathe-Marconi Streaming Radio", <255,50,0>, 10);
llListen(11,"",NULL_KEY,"");
}
touch_start(integer total_number)
{
//llSay(0, "Touched.");
llDialog(llDetectedKey(0), "Choose a stream to listen to", menu , 11);
}
listen(integer channel, string name, key id, string choice )
{
vector position = llGetPos();
// if a valid choice was made, implement that choice if possible.
// (llListFindList returns -1 if choice is not in the menu list.)
if ( llListFindList( menu, [ choice ]) != -1 )
{
if ( choice == "Amsterdam" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/jordaan.ogg");
}
else if( choice == "Boston" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/boston.ogg");
}
else if( choice == "Chicago" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/saic.ogg");
}
else if( choice == "Chicago_2" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/chicago_2.ogg");
}
else if( choice == "Marseille" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/marseille_cap.ogg");
}
else if( choice == "Oslo" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/oslo.ogg");
}
else if( choice == "Solleftea" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/solleftea.ogg");
}
else if( choice == "Stanford" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/stanford.ogg");
}
else if( choice == "Santa_Barbara" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/santa_barbara.ogg");
}
else if( choice == "Paris" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/paris-18.ogg");
}
else if( choice == "Marseille_2" )
{
llSetParcelMusicURL("http://locus.creacast.com:9001/marseille_port.ogg");
}
else
{
llSay( 0, "Invalid choice: " + choice );
}
llSetText("Pathe-Marconi Radio \n Tuned to: "+choice, <255,50,0>, 10);
}
}
}
|