Put Google drawing on a prim

Use this script to put a Google graphic on any prim. Clicking on the drawing in-world will automatically refresh it.

You can use it to create a white board for an in-world presentation. You can allow several people to edit at once by sharing the Google Doc with them.

Of course, if you’re using a second or third-generation viewer, you can simply edit the document in-world, in real time, without using this script at all.  This script is for those using SLv1-compatible viewers.

You can also use this to create signboards for your grid that you need to update on a regular basis. Just change the appropriate Google drawing, click on your sign boards, and you’re done — no need to upload new drawings and edit the textures on each surface.

Create your drawing

First, you will need to go to Google Docs and go to Create New – Drawing (in the drop-down menu on top left of screen).

Now, draw something. If you leave the background as is, it will come out transparent.

When you’ve got your drawing, click on Share – Publish to the Web (in the drop-down menu on top right of screen).

You will get a URL that looks something like:


Save that URL and paste it into the top of this script, where I’ve got the text highlighted in blue, and drop the script on any prim (flat panels work best):

//Change the address inside the quotation marks on this next line to your Google drawing:
string website = "https://docs.google.com/drawings/pub?id=1xLB4NvrfXrlWttsTAUoQdX65lj5PmA0mDuAay4Ibgdc&w=960&h=720";

float firstClick= 0;

default {

          state_entry() {

          string URLTexture = osSetDynamicTextureURL("", "image", website, "", 600);
            if (llStringLength(URLTexture)>0) {
                llSetTexture(URLTexture, ALL_SIDES);

         touch_start(integer total_number)
                key gAvatarKey = llDetectedKey(0);
                string URLTexture = osSetDynamicTextureURL("", "image", website, "", 600);
                     if (llStringLength(URLTexture)>0) {
                                  llSetTexture(URLTexture, ALL_SIDES);
           float t= llGetTime();
        if( (firstClick != 0) && (t < (firstClick + 1)) ){
            // Double Click Event
            llLoadURL(gAvatarKey, "View the original website.", website);

        } else {
            firstClick= t;


Maria Korolov

Maria Korolov is editor and publisher of Hypergrid Business. She has been a journalist for more than twenty years and has worked for the Chicago Tribune, Reuters, and Computerworld and has reported from over a dozen countries, including Russia and China. Follow me on Twitter @MariaKorolov.

3 Responses

  1. Blogit3d says:

    Dont see why you need a script to add a texture just slide it onto the prim from inventory then and a web director script in the prim

    • The advantage of using Google drawing is that you can edit it live, on the Web, and have the changes appear inside your OpenSim environment — without having to download the image, upload it into OpenSim as a texture, etc… In addition, if you share the Google drawing with others, you can collaborate on it in real time, and your changes will show up in-world.

      With media-on-a-prim, of course, you can skip the script and just pull in the link to the Google Drawing … or spreadsheet, or document, or presentation.