Three Years Late… But HTML-On-A-Prim is Here!

First impressions on the newly released mega-feature in Second Life: HTML-On-A-Prim.


Well, of course this is for me personally the cream on the top. I’ve just returned from several sessions of using SL as a classroom for university students. The last conversation I had with one of the students (doing a mastership) was about a complaint regarding the cost of uploading textures. Well, “spending” L$400-1000 or so for a class is definitely cheap in “preparation materials”… but I see the point: after all, putting it all on a Web page is cheaper 😉

Enough talking! By following the links to LL’s official blog, you’ll see Torley’s videos on how to set things up properly from the SL viewer. The techies among you might prefer to do it from inside LSL. It’s pretty easy, just use the following snippet of code as inspiration — go to a parcel where you are the owner or have permissions to change the media, drop a media texture on a prim, make sure it’s set to the same media texture on About Land >Media, and with this script you can type an URL and see it displayed on the texture. 🙂

Thanks, Linden Lab 🙂 You made your faithful fan even more happy today!

(script below)

integer listener;
touch_start(integer total_number)
listener = llListen(0, "", llDetectedKey(0), "");
listen(integer channel, string name, key id, string message)
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL, message, PARCEL_MEDIA_COMMAND_TYPE, "text/html"]);
Print Friendly, PDF & Email

About Gwyneth Llewelyn

I’m just a virtual girl in a virtual world…

  • Just to hope that they now see how it can easy to make so many fans.

  • Haha @dandellion — yes, yes, you’re right 😉

    I wonder, though, what happened to Philip’s announced “no features in 2008” policy. The upgrade to Havok 4 and to WindLight are actually viewed as “patching”/”debugging” to improve SL’s reliability (server-side on one case, client-side on the other). So although they’re new technologies, they’re not “just eye-candy” but necessary upgrades (the old code was too hard to maintain and to include new features).

    HTML-on-a-prim is by all means something new… I wonder how Philip justifies that internally!

  • OK Gwyn, what am I missing? I get an error at 36,51 saying that the name is not defined within scope? Hoping you can help this dummy.

    Here’s the script:
    integer site = 1;
    string luna = “”;
    string noel = “”;
    string pheobe = “”;

    { // beginning of state
    { // stuff between this set of brackets happens when you first load the script
    // or the script gets reset

    PARCEL_MEDIA_COMMAND_TYPE, “text/html”]);


    touch_start(integer total_number)
    if ( site == 1.0 )

    { // bracket to start doing stuff if the site is 1.0

    PARCEL_MEDIA_COMMAND_TYPE, “text/html”]);

    site = 2;
    } // bracket to end the first if statement

    else if ( site == 2 ) // “else if” is what you use for the script to keep
    // checking stuff in case that first if statement
    // isn’t valid
    { // bracket starts the else if stuff
    PARCEL_MEDIA_COMMAND_TYPE, “text/html”]);

    site = 3;
    } // end this else if stuff

    else if ( site == 3)
    PARCEL_MEDIA_COMMAND_TYPE, “text/html”]);
    site = 1.0;

    } // end of touch stuff
    } // end of state

  • @Gwyneth

    Actually Philip promised we’d see HTML on a prim by may 2008 about a month ago already in this interview, and thank you for the script 😉

  • Hello @3,

    Unfortunately, I don’t know your name, just your OpenID URL, so I’ll have to reply here instead of in-world.

    Your code has two slight bugs…

    1) llParcelMediaCommandList is missing the initial L on line 36 (thus the “name is not defined within scope” error).

    2) site is an integer, but at the very end you’re assigning it a floating point value; use site = 1; instead.

    I hope that helps!

  • one may conclude that URLs are per sim as such, and hence this is very limited experience 😀

  • Hi Gwyn,
    I have tried this script and I get always the same error: “name is not defined within scope”. What can I do? :-))

  • Arria, you’e using the Release Candidate 4, aren’t you? 🙂

  • A.T. they shouldn’t be “per sim” since RC2 came out (it was a bug in RC0, not corrected in RC1, but RC2 should work fine). With LL’s mandatory upgrade to RC4 yesterday, all these should work correctly “per avatar” again. But… try it out for yourself 🙂

  • For all those having an issue with the script, I ran into this problem when posting scripts to my site and then translating them into SL. It usually has to do with how characters translate, particularly the quotes. Best thing to do is just retype it, once you have it working pass it around as a freebie. =) I will work on it next time I am in world. Thanks for the script.