home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1995 September / PCD0995.ISO / files / gallery.dir / 00038_Right Button Script.ls < prev    next >
Encoding:
Text File  |  1994-12-18  |  2.8 KB  |  69 lines

  1. global gPictureSprite, gCurrentSection, gCurrentPicture, gNumOPics, gProductSelect, gMacIDSprite, gWindowsIDSprite, gDemoButtonSprite, gLaunchQTButton, gFirstGoRound
  2.  
  3. on mouseDown
  4.   set the puppet of sprite the clickOn to 1
  5.   repeat while the stillDown
  6.     if rollOver(the clickOn) then
  7.       set the castNum of sprite the clickOn to the number of cast "GDemoRight lit"
  8.       updateStage()
  9.       next repeat
  10.     end if
  11.     set the castNum of sprite the clickOn to the number of cast "GDemoRight"
  12.     updateStage()
  13.   end repeat
  14. end
  15.  
  16. on mouseUp
  17.   if rollOver(the clickOn) then
  18.     set the castNum of sprite the clickOn to the number of cast "GDemoRight"
  19.     set the puppet of sprite the clickOn to 0
  20.     set gCurrentPicture to gCurrentPicture + 1
  21.     if gCurrentPicture > gNumOPics then
  22.       set gCurrentPicture to 1
  23.     end if
  24.     set the castNum of sprite gPictureSprite to the number of cast (string(gCurrentSection) & string(gCurrentPicture))
  25.     set tempList to getaProp(gGalleryList, gCurrentSection)
  26.     if gCurrentPicture > 1 then
  27.       set the castNum of sprite gLaunchQTButton to the number of cast "PlayQT"
  28.       set gProductSelect to getAt(tempList, gCurrentPicture - 1)
  29.       set sectionFlags to getProp(gProductList, gProductSelect)
  30.       if getAt(sectionFlags, 1) then
  31.         set the castNum of sprite gMacIDSprite to the number of cast "macID lit"
  32.       else
  33.         set the castNum of sprite gMacIDSprite to the number of cast "macID"
  34.       end if
  35.       if getAt(sectionFlags, 2) then
  36.         set the castNum of sprite gWindowsIDSprite to the number of cast "windowsID lit"
  37.       else
  38.         set the castNum of sprite gWindowsIDSprite to the number of cast "windowsID"
  39.       end if
  40.       if the machineType <> 256 then
  41.         if getAt(sectionFlags, 3) then
  42.           set the castNum of sprite gDemoButtonSprite to the number of cast "GoDemo"
  43.         else
  44.           set the castNum of sprite gDemoButtonSprite to the number of cast "GoDemo lit"
  45.         end if
  46.         go(the frame - 1)
  47.         exit
  48.       else
  49.         if getAt(sectionFlags, 4) then
  50.           set the castNum of sprite gDemoButtonSprite to the number of cast "GoDemo"
  51.         else
  52.           set the castNum of sprite gDemoButtonSprite to the number of cast "GoDemo lit"
  53.         end if
  54.         go(the frame - 1)
  55.         exit
  56.       end if
  57.     else
  58.       set gProductSelect to #null
  59.       set the castNum of sprite gLaunchQTButton to the number of cast "NullPlay"
  60.       set the castNum of sprite gMacIDSprite to the number of cast "macID"
  61.       set the castNum of sprite gWindowsIDSprite to the number of cast "windowsID"
  62.       set the castNum of sprite gDemoButtonSprite to the number of cast "GoDemo lit"
  63.     end if
  64.   else
  65.     set the castNum of sprite the clickOn to the number of cast "GDemoRight"
  66.     set the puppet of sprite the clickOn to 0
  67.   end if
  68. end
  69.