1a8672e3-b191-de07-a075-22ad58dd48a2_script.lsl 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. //
  2. // The line above should be left blank to avoid script errors in OpenSim.
  3. /*
  4. * Part of the Sloodle project (www.sloodle.org)
  5. *
  6. * Copyright (c) 2011-06 contributors (see below)
  7. * Released under the GNU GPL v3
  8. * -------------------------------------------
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation, either version 3 of the License, or
  13. * (at your option) any later version.
  14. *
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. * All scripts must maintain this copyrite information, including the contributer information listed
  24. *
  25. * Contributors:
  26. * Paul Preibisch
  27. *
  28. * DESCRIPTION
  29. * Contributors:
  30. * Edmund Edgar
  31. * Paul Preibisch
  32. */
  33. string currentUrl;
  34. integer SLOODLE_CHANNEL_SET_SET_SHARED_MEDIA_URL_OWNER = -1639270111; // set the main shared media panel to the specified URL, accessible to the owner
  35. integer SLOODLE_CHANNEL_SET_SET_SHARED_MEDIA_URL_GROUP = -1639270112; // set the main shared media panel to the specified URL, accessible to the group
  36. integer SLOODLE_CHANNEL_SET_SET_SHARED_MEDIA_URL_ANYONE = -1639270114; // set the main shared media panel to the specified URL, accessible to anyone
  37. integer SLOODLE_LOAD_CURRENT_URL= -1639271137; //send message to shared media to open url that it is currently displaying in a browser.
  38. integer SLOODLE_CHANNEL_OBJECT_DIALOG = -3857343;
  39. default
  40. {
  41. on_rez(integer start_param) {
  42. llClearPrimMedia(3);
  43. currentUrl = "";
  44. }
  45. state_entry(){
  46. currentUrl = "";
  47. }
  48. link_message( integer sender_num, integer num, string str, key id ){
  49. if (num == SLOODLE_CHANNEL_OBJECT_DIALOG) {
  50. if (str=="do:reconfigure"||str=="do:reset"){
  51. llClearPrimMedia(3);
  52. }
  53. }else if ( (num == SLOODLE_CHANNEL_SET_SET_SHARED_MEDIA_URL_OWNER) || (num == SLOODLE_CHANNEL_SET_SET_SHARED_MEDIA_URL_GROUP) ||(num == SLOODLE_CHANNEL_SET_SET_SHARED_MEDIA_URL_ANYONE ) ) {
  54. llSetColor(<1.00000, 1.00000, 1.00000>,3);
  55. integer perms = PRIM_MEDIA_PERM_OWNER;
  56. if (num == SLOODLE_CHANNEL_SET_SET_SHARED_MEDIA_URL_GROUP) {
  57. perms = PRIM_MEDIA_PERM_GROUP;
  58. } else if (num == SLOODLE_CHANNEL_SET_SET_SHARED_MEDIA_URL_ANYONE) {
  59. perms = PRIM_MEDIA_PERM_GROUP;
  60. }
  61. currentUrl = str;
  62. llSetPrimMediaParams( 3, [ PRIM_MEDIA_CURRENT_URL, str, PRIM_MEDIA_HOME_URL, str, PRIM_MEDIA_FIRST_CLICK_INTERACT, TRUE, PRIM_MEDIA_AUTO_ZOOM, TRUE, PRIM_MEDIA_AUTO_PLAY, TRUE, PRIM_MEDIA_PERMS_INTERACT, perms, PRIM_MEDIA_PERMS_CONTROL, PRIM_MEDIA_PERM_NONE ] );
  63. }
  64. }
  65. }
  66. // Please leave the following line intact to show where the script lives in Git:
  67. // SLOODLE LSL Script Git Location: mod/set-1.0/objects/default/assets/sloodle_shared_media_screen.lslp