Zousug Corvinus Posted June 22, 2023 Share Posted June 22, 2023 Hey all, I have a item that when clicked on comes up with a menu to do a few different things. attached is another prim that has a face thats set to media, was wondering.. How can i change the media on prim url? Also, can i hide the bar that shows *stop play home etc*? And any way to have it only play when the play button is pressed in the menu system i have? thanks in advanced Link to comment Share on other sites More sharing options...
Quistess Alpha Posted June 22, 2023 Share Posted June 22, 2023 2 hours ago, Zousug Corvinus said: How can i change the media on prim url? llSetLinkMedia() PRIM_MEDIA_CURRENT_URL 2 hours ago, Zousug Corvinus said: Also, can i hide the bar that shows *stop play home etc*? PRIM_MEDIA_PERMS_CONTROL, PRIM_MEDIA_PERMS_NONE 2 hours ago, Zousug Corvinus said: And any way to have it only play when the play button is pressed in the menu system i have? If the URL is set only when the button is pressed, and the media face is turned off otherwise, and the viewer has auto-play enabled. Not necessarily recommended for general use. 1 Link to comment Share on other sites More sharing options...
Zousug Corvinus Posted June 22, 2023 Author Share Posted June 22, 2023 (edited) 54 minutes ago, Quistess Alpha said: llSetLinkMedia() PRIM_MEDIA_CURRENT_URL PRIM_MEDIA_PERMS_CONTROL, PRIM_MEDIA_PERMS_NONE If the URL is set only when the button is pressed, and the media face is turned off otherwise, and the viewer has auto-play enabled. Not necessarily recommended for general use. Thanks for the reply, was about to make a quick update post hehe I have the code in to set the url and its set auto play = false.. I then have these two buttons if(msg == "Radio On") { llSetLinkMedia(2, 2, [PRIM_MEDIA_CURRENT_URL, msg, PRIM_MEDIA_AUTO_PLAY, TRUE]); } else if(msg == "Radio Off") { llSetLinkMedia(2, 2, [PRIM_MEDIA_CURRENT_URL, ""]); } else { The Radio On option works, makes it so it plays but radio off is not taking the URL away to turn it off.. *is there away to change it to HOME which should always be blank as away to switch it off?* Iv had the off set to PRIM_MEDIA_CURRENT_URL as well with no url just "" and still dont work Edited June 22, 2023 by Zousug Corvinus Link to comment Share on other sites More sharing options...
Quistess Alpha Posted June 22, 2023 Share Posted June 22, 2023 6 minutes ago, Zousug Corvinus said: taking the URL away to turn it off https://wiki.secondlife.com/wiki/LlClearLinkMedia should work. Also, I think most viewers ignore the PRIM_MEDIA_AUTO_PLAY setting. It's a helpful suggestion to the viewer, but don't rely on it too heavily. Link to comment Share on other sites More sharing options...
Zousug Corvinus Posted June 22, 2023 Author Share Posted June 22, 2023 12 minutes ago, Quistess Alpha said: https://wiki.secondlife.com/wiki/LlClearLinkMedia should work. Also, I think most viewers ignore the PRIM_MEDIA_AUTO_PLAY setting. It's a helpful suggestion to the viewer, but don't rely on it too heavily. I have llClearLinkMedia(2, 2); in yet when i edit the prim and face it still shows the url under current page.. *also my on dosnt seem to turn it on no more lol* Link to comment Share on other sites More sharing options...
Quistess Alpha Posted June 22, 2023 Share Posted June 22, 2023 2 minutes ago, Zousug Corvinus said: also my on dosnt seem to turn it on no more lol if you're using your code above, "Radio On" doesn't look like a valid URL. . . Link to comment Share on other sites More sharing options...
Quistess Alpha Posted June 22, 2023 Share Posted June 22, 2023 3 minutes ago, Zousug Corvinus said: llClearLinkMedia(2, 2); I'd recommend not using literal faces and links except for basic testing. However, if you don't mind clearing ALL media, try llClearLinkMedia(LINK_SET, ALL_SIDES); Link to comment Share on other sites More sharing options...
Zousug Corvinus Posted June 22, 2023 Author Share Posted June 22, 2023 2 minutes ago, Quistess Alpha said: if you're using your code above, "Radio On" doesn't look like a valid URL. . . The URL is set in the admin menu.. on is just meant to set it to play, off to stop Link to comment Share on other sites More sharing options...
Quistess Alpha Posted June 22, 2023 Share Posted June 22, 2023 27 minutes ago, Zousug Corvinus said: if(msg == "Radio On") { llSetLinkMedia(2, 2, [PRIM_MEDIA_CURRENT_URL, msg, PRIM_MEDIA_AUTO_PLAY, TRUE]); } you're using msg (which has just been confirmed to have the value "Radio On") as the CURRENT_URL when you probably intend a variable representing the URL. 1 Link to comment Share on other sites More sharing options...
Zousug Corvinus Posted June 22, 2023 Author Share Posted June 22, 2023 5 minutes ago, Quistess Alpha said: you're using msg (which has just been confirmed to have the value "Radio On") as the CURRENT_URL when you probably intend a variable representing the URL. oh drats.. lol i think i fixed it.. llSetLinkMedia(2, 2, [PRIM_MEDIA_CURRENT_URL, music_url, PRIM_MEDIA_AUTO_PLAY, TRUE]); still dosnt play lol 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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