Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Webpage Interactivity via an Object

AlexBCU Scribe
Registered User
Join date: 19 Nov 2008
Posts: 7
11-20-2008 10:46
Is it possible to display a website onto an object and then have several users interact with it (I suppose this would been seen as application sharing).

For instance (even though from what I can gather Flash is not yet fully supported inside SL) could an object (a screen/plane) display a flash website where several avatars could interact with it at once (ie by clicking different flash buttons). Or alternatively could several avatars interact with a html website at once?

I'm not sure if this is way out of the scope/abilities of what the LSL language is capable of, but any help would be most appreciated.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
11-20-2008 10:57
You'd have to process user touches and send them as asynchronous events to the server, or change the URL to include the information as request parameters. It will be strange because you are going to have to process low-level input (i.e. like a mouse event) on the server rather than high level events (like which button was pressed), which means you are going to have to try to re-render (or at least re-layout) on the server in a way that will match how the SL client's browser engine does it.

In other words, it would be FAR from a trivial project, but theoretically it might be possible.
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
11-20-2008 14:22
It's been done actually (well, mostly... it was implemented before the new llDetectedTouch*() functions, so you drag a virtual mouse around the browser object instead of clicking directly). It was made by a clever dude in my uni (aka "Malcolm Glasgow" in SL), and it's totally free and open source:

http://www.sloodle.org/browser

Basically, a proxy (coded in C#) sits on a server somewhere, and when you request a webpage, it grabs it, and injects little-bitty JavaScript into the "onload" event of each link/button on the website. When the page loads in Second Life, those bits of JavaScript report the positions of the elements back to the proxy. Then, when you click the virtual mouse in SL, it reports the position back to the proxy as well, which figures out what you touched, updates the page, and notifies your 'browser' object in SL to reload.

Sounds hideously complicated... and it is. It works on more-or-less any reasonably simple HTML site (Flash is a definite no-go!), and even supports text-entry (using SL chat), so you can do stuff like Google searches. Lots of links and buttons on a single page tend to make it go slow, and alas any JavaScript errors on a page will cause it to break completely.

It's not super-reliable, but it's pretty cool anyway.