home *** CD-ROM | disk | FTP | other *** search
/ Boot Disc 1 / boot-disc-1996-08.iso / bootcd.dir / 00257_Script_257 < prev    next >
Text File  |  1996-07-02  |  2KB  |  67 lines

  1. on startMovie
  2.   global gLastSelected,gPopupSerialNum
  3.   set the colorDepth = 16
  4.   
  5.   -- Open external libraries
  6.   if the machineType = 256 then
  7.     openxlib "Popup.DLL"
  8.     set gPopupSerialNum = "PPXW200-3134962971"
  9.   else 
  10.     openxlib "Popup XObject"
  11.     set gPopupSerialNum = "PPXM200-3076188936"
  12.   end if
  13.   
  14.   set gLastSelected = 0
  15.   
  16. end startMovie
  17.  
  18. on stopMovie
  19.   global gPopupObj
  20.   if objectP(gPopupObj) then gPopupObj(mDispose)
  21.   if the machineType = 256 then
  22.     closexlib "Popup.DLL"
  23.   else 
  24.     closexlib "Popup XObject"
  25.   end if
  26. end stopMovie
  27.  
  28. on DoPopup whichPopup
  29.   global gPopupObj,gPopupSerialNum,gLastSelected,gSubCategory
  30.   
  31.   --whichPopup can be one of 3 integers currently, representing the following menus
  32.   --1 = Workbench:Utilities
  33.   --2 = Workbench:Resources
  34.   --3 = Workbench:Shareware
  35.   
  36.   if objectP(gPopupObj) then gPopupObj(mDispose)
  37.   -- Initialize the right popup menu
  38.   if whichPopup = 1 then
  39.     set gPopupObj = Popup(mNew, the text of member "Util Popup Menu")
  40.   else if whichPopup = 2 then
  41.     set gPopupObj = Popup(mNew, the text of member "Resource Popup Menu")
  42.   else if whichPopup = 3 then
  43.     set gPopupObj = Popup(mNew, the text of member "Shareware Popup Menu")
  44.   end if
  45.   
  46.   -- This popup registration line MUST be left in final code
  47.   gPopupObj(mRegister,gPopupSerialNum)
  48.   
  49.   --if the hilite of cast "auto-align" = true then
  50.   --  set itemAlign = gLastSelected
  51.   --  set h = the right of sprite (the clickOn) - 27
  52.   --  set v = the top of sprite (the clickOn)
  53.   --else
  54.   set itemAlign = 0
  55.   set h = the right of sprite (the clickOn) - 26
  56.   set v = the top of sprite (the clickOn) + 5
  57.   --end if
  58.   set result = gPopupObj(mPopupSpec,  h, v, itemAlign)
  59.   if result <> "" then
  60.     -- This will only grab the item number off of the fist item
  61.     set gLastSelected = value(result) --the item number
  62.     
  63.     set gSubCategory = gPopupObj(mGetItem, result)  --the item text
  64.   end if
  65.   put "gSubCategory =" && gSubCategory
  66. end DoPopup
  67.