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
Viewer 2 llSetPrimMediaParams_for_data_urls  

llSetPrimMediaParams_for_data_urls

Paste the below into your browser's address bar.

data:text/html,

This is a test

This is a test

This is a test



llSetPrimMediaParams for data: urls

* Thus you can build arbitrary html in your LSL script and display it on the face of the prim

Category: Viewer 2
By : Kelly Linden
Created: 2010-09-02 Edited: 2010-09-02
Worlds: Second Life

the Zip file

Download all files for llSetPrimMediaParams_for_data_urls
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. llSetPrimMediaParams_for_data_urls_1.lsl
1 show(string html)
2 {
3 html = "data:text/html," + llEscapeURL(html);
4 llSetPrimMediaParams(0, // Side to display the media on.
5 [PRIM_MEDIA_AUTO_PLAY,TRUE, // Show this page immediately
6 PRIM_MEDIA_CURRENT_URL,html, // The url currently showing
7 PRIM_MEDIA_HOME_URL,html, // The url if they hit 'home'
8 PRIM_MEDIA_HEIGHT_PIXELS,512, // Height/width of media texture will be
9 PRIM_MEDIA_WIDTH_PIXELS,512]); // rounded up to nearest power of 2.
10 }
11 default
12 {
14 {
15 show("<h1>This is a test</h1><h2>This is a test</h2><h3>This is a test</h3>");
16 }
17 }

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