Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Media Player Changer

TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
03-11-2005 11:48
Ok I seen sumone in preview with this but cence Im at work I cant log in to check if he replyed...

can anyone make a script for us to change the Media URL?

the one I seen you just typed out

/9 http://name.com/media/file.ext

Also with that note on hand have a script so you can just click a prim and it loads a URL
also have floating text in 2 lines that you can set to say what the media...

better yet to save a lot of prims have something like a radio changer with a foward and back button to scroll thru a list of Media URL's that can be accessed thru a notecard that also changes the floating text...

Yea I know I should be posting this in the scripting section but not everyone there knows much about the scripts in Preview... here I think I have a better Chance
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.
phoenix Behemoth
Registered User
Join date: 7 Oct 2004
Posts: 14
media player for 1.6.0
03-11-2005 14:53
i made a media player in 1.6.0 that shows you the url in a dialog with all controls needed also it changes tracks

(replace url address with where your stream is)
the comands are
to add url | add url address
to remove url | rem url address

this one is done by lists but may be modifyed

CODE

list stream =[];
integer randchannel;
integer current;
integer stopper;
default
{
state_entry()
{
llSetText("click for controls for multaple video",<1,1,1>,1);
randchannel = (integer)llFrand(100000) + 1;
llListen(randchannel,"","","");
llListen(0,"","","");
}

touch_start(integer total_number)
{
llDialog(llDetectedKey(0),"Media Comander \n current stream is \n " + llList2String(stream,current),["play","stop","pause","loop","Next","Back"],randchannel);
}
listen(integer channel,string name,key id,string message)
{
stopper = 1;
if (message == "play" && channel == randchannel)
{
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL, llList2String(stream,current),PARCEL_MEDIA_COMMAND_PLAY]);
}
if (message == "Next" && channel == randchannel)
{
if (current <= llGetListLength(stream) - 2 && stopper == 1)
{
current = current + 1;
llDialog(id,"Media Comander \n current stream is \n " + llList2String(stream,current),["play","stop","pause","loop","Next","Back"],randchannel);
stopper = 0;
}
if (current == llGetListLength(stream) - 1 && stopper == 1)
{
current = 0;
llDialog(id,"Media Comander \n current stream is \n " + llList2String(stream,current),["play","stop","pause","loop","Next","Back"],randchannel);
stopper = 0;
}
}
if (message == "Back" && channel == randchannel && stopper == 1)
{
if (current >= 1 && stopper == 1)
{
current = current - 1;
llDialog(id,"Media Comander \n current stream is \n " + llList2String(stream,current),["play","stop","pause","loop","Next","Back"],randchannel);
stopper = 0;
}
if (current == 0 && stopper == 1)
{
current = llGetListLength(stream) - 1;
llDialog(id,"Media Comander \n current stream is \n " + llList2String(stream,current),["play","stop","pause","loop","Next","Back"],randchannel);
stopper = 0;
}

}
if (message == "pause" && channel == randchannel)
{
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_PAUSE]);
}
if (message == "loop" && channel == randchannel)
{
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL, llList2String(stream,current),PARCEL_MEDIA_COMMAND_LOOP]);
}
if (message == "stop" && channel == randchannel)
{
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_STOP]);
}
if (llGetSubString(message,0,3) == "add " && id == llGetOwner())
{
stream += llGetSubString(message,4,llStringLength(message));
llSay(0,"stream: "+ llGetSubString(message,4,llStringLength(message)) +" added");
}
if (message == "list" && id == llGetOwner())
{
llSay(0,llDumpList2String(stream," - \n"));
}
if (llGetSubString(message,0,3) == "rem " && id == llGetOwner())
{
string messages = llGetSubString(message,4,llStringLength(message));
if(llListFindList(stream,(list)messages) != -1)
{
integer find = llListFindList(stream,(list)messages);
stream = llDeleteSubList(stream, find, find);
llSay(0,messages + " removed");
}
else
{
llSay(0,"stream url Not found");
}
}
}
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
03-11-2005 15:20
Ahh Thanks... I'll have to check this out when I get home. But till then its on my USB Pen along with the swf and movie files
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.