Parcel Web Browser
Parcel Web Browser
This script turns a prim into a functional "webpage on a prim" Internet browser, starting from the 1.19.1.1 RC viewer. To set up, first set a media texture for your land parcel(found in the Media tab of "About Land"). Then place the script in a prim to be used as your browser. Next change the texture on one side of the prim to the media texture chosen. Then say "Go www.secondlife.com". Finally, click on the play button next to the movie play icon. A static texture of the website will replace the media texture on the browser prim. Optionally, you can open an in-world pop-up browser or external browser instance of the page by clicking the prim and allowing the llLoadURL dialog to run.
Browser Commands
- Go www.yourwebsite.com: Set the current parcel media URL.
- Home: Set the current parcel media URL to your "homepage"(Can be changed in the script).
- Back: Set the current parcel media URL to the URL previously visited.
- Next: Set the current parcel media URL to the next URL(works only if the previous command was "Back").
- Reload: Re-sets the current parcel media URL(useful for websites that have updated but don't automatically show on the prim).
- Search yoursearchterm: Set the current parcel media URL to a Google search result.
<lsl> //Parcel Web Browser v2.4 //(C) Antonius Misfit 2008 //Licensed under the terms of the GNU GPLv3 or later //for the "prim preview" feature to work, //set the appropriate texture on the front //according to your parcel's web settings string home_url="http://secondlife.com"; string prev_url=""; string current_url; string next_url=""; string search_string="http://www.google.com/search?q="; default {
on_rez(integer start_params) { llResetScript(); } state_entry() { llListen(0,"",llGetOwner(),""); }
touch_start(integer total_number) { llLoadURL(llDetectedKey(0),"Load live browser instance for "+current_url+"?",current_url); } listen(integer channel,string name,key id,string message) { list args=llParseString2List(message,[" "],[]); if(llList2String(args,0)=="Go") { prev_url=current_url; current_url=llList2String(args,1); llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,current_url]); } if(llList2String(args,0)=="Home") { prev_url=current_url; current_url=home_url; llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,current_url]); } if(llList2String(args,0)=="Back") { next_url=current_url; current_url=prev_url; llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,current_url]); } if(llList2String(args,0)=="Next") { current_url=next_url; llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,current_url]); } if(message=="Reload") { llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,current_url]); } if(llList2String(args,0)=="Search") { prev_url=current_url; current_url=search_string+llList2String(args,1); llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,current_url]); } }
}
</lsl>