Jump to content

Want to turn off music in my house with a button


Leigh Writer
 Share

You are about to reply to a thread that has been inactive for 4735 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I want to have a button that will turn off the music that is playing from my AJ Jukebox. If people want to turn it back on, they just click on the jukebox and follow the directions.  Any ideas?

The AJ jukebox has a locked script so I can't make any changes to that so how can I overpower a radio channel that is already playing.  I want the button to me on the jukebox.

Thanks for your help.

Leigh Writer

zeitz@uni.edu

Link to comment
Share on other sites

I'd start by taking a look at this page.

http://wiki.secondlife.com/wiki/LlParcelMediaCommandList

This lets a prim with the appropriate lan/group access, to control the media stream. Take special note of the "PARCEL_MEDIA_COMMAND_STOP" and "PARCEL_MEDIA_COMMAND_PLAY" commands.

Probably the easiest way to do this, is simply to build a small control panel, using either several prim buttons, one named "play" one named "stop" one named "pause" etc. Then make a script that says "If the name of the prim that was touched, is "play" then execute the play command". Then just do the same thing for a pause button, a stop button, etc.

I don't know exactly how your jukebox thing works, so this may not be compatable if the jukebox is switching streams all the time, it might re-start the media stream each time it does that. But depending on how it works, this might be a simple enough solution... something like this:

default
{
    touch_start (integer count)
    {
        string command = llGetLinkName(llDetectedLinkNumber(0));

        if (command == "pause") llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_PAUSE]);
        else if (command == "stop") llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_STOP]);
        else if (command == "play") llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_PLAY]);
    }
}

Link to comment
Share on other sites

if the product juke box (I'm not familiar with it) allows each user to pick their own station, then you could probably just add a station that is known to not be working, and label it as "Off"... actually this should work regardless.

if you take Winters suggestion, and the radio does allow individual avatar stations as described above, then make sure to add PARCEL_MEDIA_COMMAND_AGENT and your key, so that it's only turned off for you and not everyone.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4735 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...