Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Sound BoomBox  

BoomBox

boombox.lsl

Category: Sound
By : Mitz
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for BoomBox
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. BoomBox_1.lsl
1 //BoomBox by Mitz
2 integer counter;
3 integer soundCount;
4 list songs;
5 list NEXT;
6
7 GetSongNames()
8 {
9 integer i;
11 {
13 }
14 }
15
16
17 default
18
19 {
20
21 changed(integer what)
22 {
23 if(what & CHANGED_INVENTORY)
25 }
26 on_rez(integer rez)
27 {
29 }
30
32 {
33 counter =0;
35 GetSongNames();
36 //PreLoadSongs();
38 llListen(-1, "", llGetOwner(), "");
39 NEXT = llList2List(songs, 0, 8);
40 }
41
42 touch_start(integer fingers)
43 {
45 {
46 llDialog(llGetOwner(), "Songs", NEXT + ["< Prev", "Stop", "Next >"], -1);
47 }
48 }
49
50 listen(integer channel, string name, key id, string message)
51 {
52 if(message != "< Prev" && message != "Stop" && message != "Next >" )
53 {
54 llLoopSound(message, 1);
55 llOwnerSay("Now Playing " + llToUpper(message) );
56 }else{
57 if(message == "< Prev")
58 {
59 counter = counter - 9;
60 NEXT = [];
61 NEXT = llList2List(songs, counter , -1);
62 if( llGetListLength(NEXT) > 9)
63 {
64 NEXT = llDeleteSubList(NEXT, 9, -1);
65 }
66 llDialog(llGetOwner(), "Songs", NEXT + ["< Prev", "Stop", "Next >"], -1);
67 }
68
69 if(message == "Stop")
70 {
72 }
73
74 if(message == "Next >")
75 {
76 counter = counter + 9;
77 NEXT = [];
78 NEXT = llList2List(songs, counter , -1);
79 if( llGetListLength(NEXT) > 9)
80 {
81 NEXT = llDeleteSubList(NEXT, 9, -1);
82 }
83 llDialog(llGetOwner(), "Songs", NEXT + ["< Prev", "Stop", "Next >"], -1);
84 }
85 }
86 }
87 }

Back to the Best Free Tools in Second Life and OpenSim.