Jump to content

Stop Prim Media


Tech Robonaught
 Share

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

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

Recommended Posts


i use an 8 face mesh prim as my buttons,

and send the info via message linked.and SLPPF

You have to change the media prim's  face texture to the one that your

parcel uses ....check "about land" - media tab to see which texture to use.

** P.S. the "post code" button on these forums SUCKS

___________________________________________



// code snippet ... this is in the 8-faced mesh buttons... in this case , they are the ROOT prim

 // the media prim is link number 2


 face = llDetectedTouchFace(0);
            if(face == 7)
            {   k = !k;
                if(k)
               {
                 llMessageLinked(LINK_ROOT, 0,"Play",id);
                  llSetLinkPrimitiveParamsFast(2,                  
                  [ PRIM_TEXTURE,0, "c1528119-ea5f-5f85-da45-b0297a79ac18",
                  <0.66, 0.44, 0.0>, <0.864, 0.220, 0.0>, 0.0 ]) ;
               }
               else
               {
                 llMessageLinked(LINK_ROOT, 0,"Stop", "");
                 llSetLinkPrimitiveParamsFast(2,                  
                  [ PRIM_TEXTURE,0, "c1528119-ea5f-5f85-da45-b0297a79ac18",
                   <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0 ]);
                }
              }

             if(face == 6)
            {
                if(k)  // if tv is ON
                {  llMessageLinked(LINK_ROOT, 0,"Next>>", "");
                }
            }
             if(face == 5)
            {
                 if(k)  // if tv is ON
                {  llMessageLinked(LINK_ROOT, 0,"<<Prev", "");
                }
            }

//  then , in the link message event, you change the media...

link_message(integer sender_num, integer num, string msg, key id)
 {
        if (msg == "Stop")
        {        
             llSay(0,"\nTurning off Widescreen");
             llClearLinkMedia(2, 0);
              llSetLinkPrimitiveParamsFast(2,
               [ PRIM_TEXTURE,0,"c1528119-ea5f-5f85-da45-b0297a79ac18",<1.0,1.0,0.0>,<0.0,0.0,0.0>,0.0 ]);
             
            llResetScript();   
        }

       // you need to set a variable that holds the URL

         // myURL =


         if (msg == "Next>>")
        {  // read a NC or set your next URL
           llSetLinkMedia(2,0,[ PRIM_MEDIA_CURRENT_URL,myURL]);
        }
        if (msg == "<<Prev")
       { // read a NC or set your next URL      
         llSetLinkMedia(2,0,[ PRIM_MEDIA_CURRENT_URL,myURL]);
       }
 }

 that should get you started, check the wiki for more help...

http://wiki.secondlife.com/wiki/LlMessageLinked

http://wiki.secondlife.com/wiki/LlSetLinkPrimitiveParamsFast#llSetLinkPrimitiveParamsFast

http://wiki.secondlife.com/wiki/LlSetLinkMedia

http://wiki.secondlife.com/wiki/LlClearLinkMedia

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3390 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...