[Opensim-users] HTML on a Prim in OpenSim

Robert Klein rtkwebman at gmail.com
Sun Jul 19 20:19:56 UTC 2009


Hey Daniel,

Here is the script that used to work. If you can get it working please let
me know how you did it.

-Robert

//XEngine:
// Original by tx Oh
// commented MODS by WhiteStar (Apr.21.09)
//
string url;  // to keep the URL persistent
default 
{
    state_entry() 
    {
        llListen(5, "", llGetOwner(), ""); // listen to Owner Only
        llSetText("Say '/5 http://someurl.org'\nto get a webpage displayed
on the prim", <1.0, 0.5, 0.0>, 1);
    }
       
    listen(integer ch, string name, key id, string url) 
    {
        llSetText("",<0,0,0>,0); // Got a URL so clear the hover text
       
llHTTPRequest("http://pici.picidae.net/browse.php?c=0&f=&u="+url,[],"");
    }
    http_response(key rid, integer status, list metadata, string msg) {
        list l = llParseString2List(msg, ["img src=\""], []);
        string img = llList2String(l, 1);
        l = llParseString2List(img, ["\""], []);
        img = llList2String(l, 0);
        string url = "http://pici.picidae.net/" + img;
        string URLTexture = osSetDynamicTextureURL("", "image", url, "",
600);
        if (llStringLength(URLTexture)>0) 
        {
            llSetTexture(URLTexture, ALL_SIDES);
        }
    }
}

//===================================================================




Daniel-25 wrote:
> 
> Hi Robert,
> 
> thanks for your reply. Your script works fine for me, too. Showing an 
> image on a prim is no problem. But have you ever tried to show a 
> complete web page (eg.: www.msn.com) on a texture like it is done in 
> Second Life? That's the feature that doesn't work for me and I'm 
> interested in how to get it work in Opensim.
> 
> 
> Daniel
> 
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/HTML-on-a-Prim-in-OpenSim-tp3273574p3285652.html
Sent from the opensim-users mailing list archive at Nabble.com.



More information about the Opensim-users mailing list