Jump to content

Clickable Instagram and Flkr Link in HUD


Leigh Avelino
 Share

You are about to reply to a thread that has been inactive for 1097 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi.  I have created a HUD for a mesh item I created in blender.  I want to have my Instagram and Flickr account clickable on the HUD.  How can I do this?  Ive searched the forums but can not find an answer.    Any help would be appreciated. 

Link to comment
Share on other sites

so i need to combine these 2 scripts basically?  and add to a notecard inside a small prim box which is invisible behind my graphc of IG or Flickr?  am i correct in that line of thought.  this is all new to me so ive no idea about how to do this.  any help is greatly appreciated.  so basically i want the small box to be touchable when the person opens the HUD onscreen.  then the client would click the button to see my other items on Flickr or IG.

default
{
    touch_start(integer total_number)
    {
        integer touchFace = llDetectedTouchFace(0);
        vector  touchST   = llDetectedTouchST(0);
 
//      ZERO_VECTOR (<0.0, 0.0, 0.0> ... the origin) is in the bottom left corner of the face
//      touchST.x goes across the face from the left to the right
//      touchST.y goes up the face from the bottom to the top
 
        if (touchFace == -1)
            llWhisper(PUBLIC_CHANNEL, "Sorry, your viewer doesn't support touched faces.");
        else if (touchST == TOUCH_INVALID_TEXCOORD)
            llWhisper(PUBLIC_CHANNEL, "Sorry, the touch position upon the face could not be determined.");
        else
            llSay(PUBLIC_CHANNEL, "llDetectedTouchST(0) = " + (string)touchST
                    + "\ntouchST.x = " + (string)touchST.x
                    + "\ntouchST.y = " + (string)touchST.y);
 

default { touch_start(integer num_detected) { key id = llDetectedKey(0); integer avatarInSameSim = (llGetAgentSize(id) != ZERO_VECTOR);// TRUE or FALSE   if (avatarInSameSim) { string info = "Visit the Second Life website!";   // must start with either "http://..." or "https://..." string url = "http://www.secondlife.com/";   llLoadURL(id, info, url); } else { llInstantMessage(id, "I can only open a URL dialog on your screen if you're in my sim!"); } } }

 

Link to comment
Share on other sites

ok got the buttons to be clickable on the HUD when its in my design room and dragged onto the floor.  the touch hand is there and the request to open external browser comes up fine.  but when i wear the HUD and its on my screen basically, the buttons dont have touch available anymore.  its not clickable.   how can i fix that?

Link to comment
Share on other sites

  • 2 weeks later...

This is if your flickr button is not a separate mesh. Use your own buttons face number!

string link1 = "https://www.flickr.com/";
string link1_name = "Flickr";

default
{
    touch_start(integer total_number)
    {
        if(llDetectedKey(0) != llGetOwner()) return;

        integer face = llDetectedTouchFace(0);
        
        if(face == 0) // Your buttons face number
        {
            llOwnerSay("Follow me on ["+link1+" "+link1_name+"]!");
        }     
    }
}

And this is if your flickr button is a separate mesh. Simply name your button "flickr"

string link1 = "https://www.flickr.com/";
string link1_name = "Flickr";

default
{
    touch_start(integer total_number)
    {
        if(llDetectedKey(0) != llGetOwner()) return;

        string button = llGetLinkName(llDetectedLinkNumber(0));
        
        if (button == "flickr") // Your buttons name
        {
            llOwnerSay("Follow me on ["+link1+" "+link1_name+"]!");
        }     
    }
}

Place script to the root :)

Link to comment
Share on other sites

3 hours ago, Kyrah Abattoir said:

That's nice of you but you aren't teaching people anything by giving them ready to use scripts :/

Thanks for the criticism, I will consider! by the way, I just noticed that I made a script for only one link, so there’s still something to ponder! :)

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1097 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...