The /presentation viewer/slide show. Has two modes, Auto and Manual. All settings are controlled through a simple dialog box. All you have to do is delete out the demo images in the viewer, put in your own images, then reset the system.

The slide show will run in alphabetical order, if you want a specific order, you will name accordingly. I recommend using something like a_PicName to get a sort that you want.

Auto Mode:
Automatically rotates through all images in the viewer. The default for Auto Mode is 5 seconds per slide. You can however, set the time to the following intervals.
2, 3, 5, 10, 15, 20, 30, 45, 60 (in Seconds

You can start, pause and stop the presentation.

Manual Mode:
You control the presentation, you can move forward and backwards through your presentation.

Switching modes:
Auto to Manual: Pause the presentation, then use the back and next normally.

Manual to Auto: Click Auto Start, it will wait the specified time, and then start rotating through the slides.

  1. integer intCurTexture;      //Current Texture
  2. integer intInvNum;          //Inventory Number
  3. integer intRunning;         //Script Status (1. Running, 0. Stopped)
  4. integer intSlideDur;        //Slide Duration
  5. integer intDialog;          //Dialog Channel
  6. list    lstMenu;            //Dialog Menu
  7. list    lstMenuTime;        //Dialog Time Menu
  8. integer intAutoMan;         //Type of Show (1. Auto, 2. Manual)
  9. key     keyMenuTouch;       //Who Touched the menu
  10.  
  11. MainMenu()
  12. {
  13.     llDialog(keyMenuTouch, "Auto Start/Pause/Stop: Automatic Slide Show Controls.  Use Set Timer to change slide duration.\n Back/Next: Manutal Slidesow controls.\nTo go from Auto to Manual Pause the presentation.", lstMenu, intDialog);
  14. }
  15.  
  16. default
  17. {
  18.     state_entry()
  19.     {
  20.         //Default Slide Duration 5 Seconds
  21.         intSlideDur=5;
  22.  
  23.         //Dialog Communcations change
  24.         //Can be set to any whole number
  25.         intDialog=96224;
  26.  
  27.         //Set Main Menu
  28.         lstMenu =["Back"," ","Next","Auto Start","Pause","Auto Stop","Reset","Set Timer","Help"];
  29.         //Set Timer Menu
  30.         lstMenuTime=["30","45","60","10","15","20","2","3","5"];
  31.  
  32.         llListen(intDialog, "", llGetOwner(), "");
  33.         intInvNum = llGetInventoryNumber(INVENTORY_TEXTURE);    //Get # of Textures
  34.         intInvNum=–intInvNum;  //Lower # of textures by 1
  35.         intCurTexture=0;    //Set Current Texture to 0
  36.         llSetTimerEvent(0);   //Stop Show
  37.         llSay(0,"Presentation Viewer Ready");
  38.         llSetText("~ Offline ~\nTouch to Start", <1,1,1>, 1);
  39.     }
  40.  
  41.     touch_start(integer total_number)
  42.     {
  43.         keyMenuTouch = llDetectedKey(0);
  44.         MainMenu();
  45.     }
  46.  
  47.     listen(integer channel, string name, key id, string message)
  48.     {
  49.         if (message=="Reset")
  50.         {
  51.             llSay(0, "Reseting Script");
  52.             llResetScript();
  53.         }
  54.         else if(message=="Help")
  55.         {
  56.             llGiveInventory(keyMenuTouch, "_Presentation Viewer Help");
  57.         }
  58.         else if(message=="Auto Start")
  59.         {
  60.             llSetTimerEvent(intSlideDur); // Set Slide Duration
  61.             llSay(0,"Auto slide show started");
  62.         }
  63.         else if (message=="Pause")
  64.         {
  65.             llSetTimerEvent(0); //0 means that the timer is off
  66.             llSay(0,"Auto slide show paused");
  67.             MainMenu();
  68.         }
  69.  
  70.         else if (message=="Auto Stop")
  71.         {
  72.             intCurTexture = 0;
  73.             llSetTimerEvent(0); //0 means that the timer is off
  74.             llSetTexture("20e9a242-9df2-fa6b-8b9d-d5b728fdf922",3);
  75.             llSetText("Fermi Designs Presentation Viewer", <1,1,1>, 1);
  76.             llSay(0,"Auto slide show stopped");
  77.         }
  78.         else if (message=="Back")
  79.         {
  80.             if (intCurTexture == 0)
  81.             {
  82.                 //Do Nothing
  83.             }
  84.             else
  85.             {
  86.                 –intCurTexture;
  87.                 if (intCurTexture < 0);
  88.                 {
  89.                     intCurTexture = 0;
  90.                 }
  91.                 llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, intCurTexture),3);
  92.                 llSetText(llGetInventoryName(INVENTORY_TEXTURE, intCurTexture), <1,1,1>, 1);
  93.                 MainMenu();
  94.             }
  95.         }
  96.         else if (message=="Next")
  97.         {
  98.             if (intCurTexture == intInvNum)
  99.             {
  100.                 // Do Nothing
  101.                 MainMenu();
  102.             }
  103.             else
  104.             {
  105.                 llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, intCurTexture),3);
  106.                 llSetText(llGetInventoryName(INVENTORY_TEXTURE, intCurTexture), <1,1,1>, 1);
  107.                 ++intCurTexture;
  108.                 MainMenu();
  109.             }
  110.         }
  111.         else if (message=="Auto")
  112.         {
  113.             llSay(0, "Reseting Script");
  114.             llResetScript();
  115.         }
  116.         else if (message=="Manual")
  117.         {
  118.             llSay(0, "Reseting Script");
  119.             llResetScript();
  120.         }
  121.         else if (message=="Set Timer")
  122.         {
  123.             llDialog(id, "Please select the amount of time you would like between slides.\n\nAll times are in seconds", lstMenuTime, intDialog);
  124.         }
  125.     // Timer Settings
  126.         else if (message=="2")
  127.         {
  128.             intSlideDur=2;
  129.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  130.         }
  131.         else if (message=="3")
  132.         {
  133.             intSlideDur=3;
  134.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  135.         }
  136.         else if (message=="5")
  137.         {
  138.             intSlideDur=5;
  139.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  140.         }
  141.         else if (message=="10")
  142.         {
  143.             intSlideDur=10;
  144.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  145.         }
  146.         else if (message=="15")
  147.         {
  148.             intSlideDur=15;
  149.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  150.         }
  151.         else if (message=="20")
  152.         {
  153.             intSlideDur=20;
  154.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  155.         }
  156.         else if (message=="30")
  157.         {
  158.             intSlideDur=30;
  159.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  160.         }
  161.         else if (message=="45")
  162.         {
  163.             intSlideDur=45;
  164.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  165.         }
  166.         else if (message=="60")
  167.         {
  168.             intSlideDur=60;
  169.             llWhisper(0, "Slide Duration is now " + (string)intSlideDur + " seconds.");
  170.         }
  171.     }
  172.     timer()
  173.     {
  174.  
  175.         llSetTexture(llGetInventoryName(INVENTORY_TEXTURE, intCurTexture),3);
  176.         llSetText(llGetInventoryName(INVENTORY_TEXTURE, intCurTexture), <1,1,1>, 1);
  177.             ++intCurTexture;
  178.             if (intCurTexture==intInvNum)
  179.             intCurTexture=0;
  180.     }
  181.  
  182. }
Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • blogmarks
  • MySpace
  • PDF
  • RSS
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Bookmarks