Sunday, March 09, 2008

HTML on a PRIM (Sort of)

With the new Second Life Release Client 1.19.1, we get a chance to see a feature that will be implemented soon, HTML Pages displayed thru the media streaming texture.

As its kinda useful to some projects I'm doing , I rattled up some basic code last night to slideshow webpages with clickthru to their URL. Feel free to amend and add functionality if useful.

list URLs = ["","",""]; //List of URLS
list Desc = ["Leeds College Website","Angrybeth's Page","BBC homepage"]; //List of URL descriptions - keep in order of List of URLs...

integer slides;
integer slidecount = 0;
string SETURL;
string URLDESC;
llSetTimerEvent(20.0); //Change this for timing of sequence, obviously....
slides = llGetListLength(URLs);

if (slidecount == slides)
slidecount = 0;

SETURL = llList2String(URLs, slidecount);
URLDESC = llList2String(Desc,slidecount);
slidecount ++;

touch_start(integer touched)
key who = llDetectedKey(0);

Obviously, stick this script inside the prim that is displaying the media texture...

One thing I do like is that llLoadURL - opens the inclient web-browser like the OnRez client. But at the moment it doesn't support Flash

But, when you load a webpage with Quicktime media embedded, it shows up on the Avatars HUD rather than on the webpage.

1 comment:

Daniel Livingstone said...

Nice script, though tempted to try for a version of Tony Hirst's Feedshow - create a webscript to complement this to turn a list of URLs into the slide show