• Winking Gwyn
  • Categories

  • Feeling generous today? Any money received will support the continued web hosting of this blog. Donate towards my web hosting bill!
  • Gwyneth Llewelyn is offline in Second Life.
  • Pages

  • Meta

  • Blog Rank: 124,475
  • Status Updates

    • [Blog] SL 2.0 Beta still running too slowly on your Mac? No worries!: If, like me, you're not the kind of person th... http://ping.fm/Y0gYX
      7 days ago
    • [Blog] The new possibilities of the XStreetSL "money API"?: I have to confess, I'm quite excited by the tremendous ... http://ping.fm/arSLj
      7 days ago
    • Yay, XStreetSL got some properly working CSS :) No more horizontal scroll bars... it's fluid now :)
      9 days ago
    • [Blog] Where is There?: Nowhere! http://ping.fm/khsS6
      9 days ago
    • Not There Any More: There.com shuts down its virtual world: http://ping.fm/wTCnW
      9 days ago
    • New simulator server software (1.36.4) seems to fix the problem with Estate Bans that didn't work: http://ping.fm/6Zr1W
      10 days ago
    • Call for speakers for the B2P 2010 Spring Conference "Leadership in Business" in #SL, promoted by @B2PBetaTech: http://ping.fm/DhXZT
      10 days ago
    • What a great idea: better integration of shared media and the UI on HUDs (adding transparency): http://ping.fm/FwJL6
      15 days ago
    • Our own @Doubledown_InSL hits CNN: http://ping.fm/W0aEK Congrats, DD! (Thanks for the link, @TrudyTakacs!)
      16 days ago
    • [Blog] On the Second Life 2.0 Viewer Revolution...: A few reasons why the SL 2.0 viewer will revolutionise Second L... http://ping.fm/xn3rY
      16 days ago
  • PostRank Topblogs 2009 - #16 in Virtual Worlds
  • RSS My Other Blog

07 Mar

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.

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;

default
{
    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"]);
        llListenRemove(listener);
    }
}
 

Related posts:

  1. [FIXED] HTML-on-a-prim becomes crash-sim-on-a-line-of-a-code
  2. Figuring out your online status in Real World
  3. A Touching Event
  4. Generic llSitTarget Positioning Script
  5. SL/HTML – Merging the Old 2D World with the New 3D World

Related posts brought to you by Yet Another Related Posts Plugin.

  • 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.
  • 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 :)
  • Arria, you'e using the Release Candidate 4, aren't you? :)
  • Hi Gwyn,
    I have tried this script and I get always the same error: "name is not defined within scope". What can I do? :-))
  • one may conclude that URLs are per sim as such, and hence this is very limited experience :D
  • 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!
  • @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 ;)
  • 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 = "http://lunajubilee.blogspot.com";
    string noel = "http://ingmanndesign.com";
    string pheobe = "http://slfashionality.blogspot.com";

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

    llParcelMediaCommandList([
    PARCEL_MEDIA_COMMAND_URL, noel,
    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

    llParcelMediaCommandList([
    PARCEL_MEDIA_COMMAND_URL, noel,
    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
    lParcelMediaCommandList([
    PARCEL_MEDIA_COMMAND_URL, luna,
    PARCEL_MEDIA_COMMAND_TYPE, "text/html"]);

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

    else if ( site == 3)
    {
    lParcelMediaCommandList([
    PARCEL_MEDIA_COMMAND_URL, pheobe,
    PARCEL_MEDIA_COMMAND_TYPE, "text/html"]);
    site = 1.0;

    }
    } // end of touch stuff
    } // end of state
  • 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!
  • Just to hope that they now see how it can easy to make so many fans.
blog comments powered by Disqus

© 2010 Gwyn’s Home | Entries (RSS) and Comments (RSS)

Powered by Wordpress, design by Web4 Sudoku, based on Pinkline by GPS Gazette