SL Pro! Conference
  • 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] Fake Avatars and the Duplicates Paradox: An Essay by Extropia DaSilva: In ‘A Tale Of Two Avatars’, Wagne... http://ping.fm/B98Ji
      2 days ago
    • Interviewing Namssor Daguerre about Second Skin Labs: http://ping.fm/nFR7J
      4 days ago
    • [Blog] Some fun evolution on skins over the years...: One skin designer (Namssor Daguerre) and 6 years of the histo... http://ping.fm/MwsTp
      4 days ago
    • Some fun comparison on how skins changed in #SL over the past 6 years: http://ping.fm/rIVeS
      4 days ago
    • I bought my first Second Skin from Namssor in October 2004. Gosh, it made a huge difference!... http://ping.fm/kMHcZ
      4 days ago
    • For those who don't know it, Namssor Daguerre, although very shy about it, was the first skin designer in SL. He's been around for 6 years.
      4 days ago
    • RT @B2PBetaTech: SecondSkin Labs Grand Opening - music, prizes, beautiful photorealistic skins 11:30a -3p #secondlife http://ow.ly/14bDw
      4 days ago
    • Discussion later today at Thinkers: Fashion! http://ping.fm/XZ8MA
      7 days ago
    • [Blog] Obsessive about Real Identity?: I had started to write this in mid-October but never finished it... and the ... http://ping.fm/Ble4W
      9 days ago
    • ... probably not, says Hiro :)
      11 days ago
  • PostRank Topblogs 2009 - #16 in Virtual Worlds
  • RSS My Other Blog

text on a prim script

You came here from www.google.hu searching for text on a prim script. These posts might be of interest:

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. A Touching Event
  3. SL/HTML – Merging the Old 2D World with the New 3D World
  4. Generic llSitTarget Positioning Script
  5. Some fun evolution on skins over the years…

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

  • 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 = "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
  • @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 :D
  • 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.
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