Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to write an active Web link in a notecard?

Marsan Benelli
Registered User
Join date: 11 Sep 2007
Posts: 1
11-16-2007 14:41
Probably the question is quite naive, however, I need to do as of subject: to create and place inside a notecard an active link to the www.
The notecard I placed inside an object I created (the miniature of a book) and the link will be to an e-shop where to buy the RL book.

At the moment the notecard can be taken only "opening" the object, I would also know how to be able to let the visitor have the notecard simply clicking on the miniature.

Thanks for reading,
Marsan
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
11-16-2007 16:40
Well, the notecard-giver-on-touch is the easy part, just put in a touch event into the proper state in your script, something like:

default {
touch_start(integer iCount) {
llGiveInventory(llDetectedKey(0),"My Notecard";);
}
}

As for the URL, you can't embed clickable URLs in notecards. The only thing you can embed links to is other SL objects, like landmarks, other notecards, textures, etc. URLs can't be made into drag/droppable items, thus they can't be made open-on-click in a notecard.

However, you can open the website from clicking on the book, just like giving out the notecard, something like:

default {
touch_start(integer iCount) {
llGiveInventory(llDetectedKey(0),"My Notecard";);
llLoadURL(llDetectedKey(0),"Buy this book at our web store!","http://www.mybookstore.com/showproduct.php?id=12345";);
}
}

That will both give them a notecard and open a blue popup window with a button to load the specified webpage in the default web browser.