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
Presentation Presentation Board with GIF capability  

Presentation Board with GIF capability

LumVision-Presentation Script v 0.2

Category: Presentation
By : Lum Pfohl
Created: 2015-11-24 Edited: 2015-11-24
Worlds: Second Life

the Zip file

Download all files for Presentation Board with GIF capability
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. [184601 bytes] dragon lady5;2;5.jpg
Get file # 2. [36284 bytes] dragon;4;4;5.jpg
Get file # 3. Script for Board.lsl
1 // Mods by Ferd Frederix to support GIFS
2 //
3 // LumVision-Presentation Script v 0.2
4 //
5 // Written by Lum Pfohl December 11, 2007
6 //
7 // January 02, 2008 - Added code to precache the next texture after a short time delay
8
9
10 // set to TRUE if you want debug messages written to chat screen
11 integer __debug = FALSE;
12 string __version_id = "Presentation Script v 0.3";
13
14 // global variables
15 integer interval;
16 integer currentTexture = 0;
17
18 integer totalTextures = 0;
19 list textureList =[];
20 integer messageChannel = 999888;
21 list dynMenu =["Back", "Version", "Forward", "Reset"];
22
23
24 gif()
25 {
26 string t = llList2String(textureList, currentTexture);
27 list gif = llParseString2List(t,[";"],[]);
28 string aname = llList2String(gif,0);
29 integer X = (integer) llList2String(gif,1);
30 integer Y = (integer) llList2String(gif,2);
31 float FPS = (float) llList2String(gif,3);
32 float product = X * Y;
33
34
35
36 // Set the new prim texture
37
38 llSetTexture(llList2String(textureList, currentTexture), 0);
39
40 if(X) {
41 llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, X, Y, 0.0, product, FPS);
42 } else {
43 llSetTextureAnim( LOOP, ALL_SIDES, 1,1, 0.0, 1 , FPS);
44 }
45
46 }
47 default {
48 state_entry() {
49
50
51 // read in the textures in the prim and store it
53
54 integer j;
55
56 for (j = 0; j < typeCount; ++j) {
58 if(__debug) {
59 llWhisper(0, "Inventory " + invName);
60 }
61 textureList += invName;
62 ++totalTextures;
63 }
64
65 if(__debug) {
66 llWhisper(0, "Found " + (string) totalTextures + " textures");
67 }
68
69 llSetTexture(llList2String(textureList, 0), 0);
70 gif();
71
72 // initialize the channel on which the vendor will talk to the owner via dialog
73 messageChannel = (integer) llFrand(2000000000.0);
74 llListen(messageChannel, "", NULL_KEY, "");
75
76 currentTexture = 0;
77 }
78
79 on_rez(integer start_param) {
81 }
82
83
84 touch_start(integer total_number) {
85
86 if(llDetectedKey(0) == llGetOwner()) {
87 llDialog(llDetectedKey(0), "What do you want to do?", dynMenu, messageChannel);
88 }
89
90 }
91
92 // listen for for dialog box messages and respond to them as appropriate
93
94 listen(integer channel, string name, key id, string message) {
95
96 if(id != llGetOwner()) {
97 return;
98 }
99
100 if(message == "Version") {
101 llWhisper(0, __version_id);
102 return;
103 }
104
105 if(message == "Reset") {
107 }
108
109 if(message == "Back" && currentTexture > 0) {
110 --currentTexture;
111 } else if(message == "Forward") {
112 ++currentTexture;
113 } else {
114 llDialog(llGetOwner(), "What do you want to do?", dynMenu, messageChannel);
115 return;
116 }
117
118 // If there are textures to apply, do so now. Otherwise - quietly
119 // do nothing.
120 if(totalTextures > 0) {
121
122 // Ensure that we do not go out of bounds with the index
123 if(currentTexture >= totalTextures) {
124 currentTexture = 0;
125 }
126 if(currentTexture < 0 ) {
127 currentTexture = 0;
128 }
129
130 gif();
131
132 // set up so that in 3 seconds, we display the next image on a different face (hidden)
133 llSetTimerEvent(3.00);
134
135 llDialog(llGetOwner(), "What do you want to do?", dynMenu, messageChannel);
136 }
137 }
138
139 timer() {
140 // Cancel any further timer events
141 llSetTimerEvent(0.00);
142
143 // set the next texture (as a pre-cache) on the reverse face
144 integer nextTexture = currentTexture + 1;
145 if(nextTexture >= totalTextures) {
146 nextTexture = 0;
147 }
148 llSetTexture(llList2String(textureList, nextTexture), 1);
149 }
150
151 changed(integer what)
152 {
153 if(what & CHANGED_INVENTORY)
155 }
156
157 }

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