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

  1. global gPictureSprite, gCurrentSection, gCurrentPicture, gNumOPics, gProductSelect, gMacIDSprite, gWindowsIDSprite, gDemoButtonSprite, gLaunchQTButton
  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 "GDemoLeft lit"
  8.       updateStage()
  9.       next repeat
  10.     end if
  11.     set the castNum of sprite the clickOn to the number of cast "GDemoLeft"
  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 "GDemoLeft"
  19.     updateStage()
  20.     set the puppet of sprite the clickOn to 0
  21.     set gCurrentPicture to gCurrentPicture - 1
  22.     if gCurrentPicture < 1 then
  23.       set gCurrentPicture to gNumOPics
  24.     end if
  25.     set the castNum of sprite gPictureSprite to the number of cast (string(gCurrentSection) & string(gCurrentPicture))
  26.     set tempList to getaProp(gGalleryList, gCurrentSection)
  27.     if gCurrentPicture > 1 then
  28.       set the castNum of sprite gLaunchQTButton to the number of cast "PlayQT"
  29.       set gProductSelect to getAt(tempList, gCurrentPicture - 1)
  30.       set sectionFlags to getProp(gProductList, gProductSelect)
  31.       if getAt(sectionFlags, 1) then
  32.         set the castNum of sprite gMacIDSprite to the number of cast "macID lit"
  33.       else
  34.         set the castNum of sprite gMacIDSprite to the number of cast "macID"
  35.       end if
  36.       if getAt(sectionFlags, 2) then
  37.         set the castNum of sprite gWindowsIDSprite to the number of cast "windowsID lit"
  38.       else
  39.         set the castNum of sprite gWindowsIDSprite to the number of cast "windowsID"
  40.       end if
  41.       if the machineType <> 256 then
  42.         if getAt(sectionFlags, 3) then
  43.           set the castNum of sprite gDemoButtonSprite to the number of cast "GoDemo"
  44.         else
  45.           set the castNum of sprite gDemoButtonSprite to the number of cast "GoDemo lit"
  46.         end if
  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.         exit
  55.       end if
  56.     else
  57.       set gProductSelect to #null
  58.       set the castNum of sprite gLaunchQTButton to the number of cast "NullPlay"
  59.       set the castNum of sprite gMacIDSprite to the number of cast "macID"
  60.       set the castNum of sprite gWindowsIDSprite to the number of cast "windowsID"
  61.       set the castNum of sprite gDemoButtonSprite to the number of cast "GoDemo lit"
  62.     end if
  63.   else
  64.     set the castNum of sprite the clickOn to the number of cast "GDemoLeft"
  65.     set the puppet of sprite the clickOn to 0
  66.   end if
  67. end
  68.