home *** CD-ROM | disk | FTP | other *** search
/ Encyklopedia Omnia / Planeta.iso / data / s_gen.dir / 00041_BerscenHandlers.ls < prev    next >
Encoding:
Text File  |  2000-11-09  |  1.8 KB  |  66 lines

  1. on handleMouseUpBerscen
  2.   global gMouseDownLocVR, gCatenaccio, gMessageID
  3.   set offs to point(2, 2)
  4.   set p to point(mouseH(), mouseV())
  5.   if inside(gMouseDownLocVR, rect(p - offs, p + offs)) then
  6.     set id to the hotSpotID of sprite(1)
  7.     if the HotSpotType of sprite(1) = "link" then
  8.       exit
  9.     end if
  10.     case id of
  11.       157:
  12.         sound stop 2
  13.         set the MouseUpHandler of sprite(1) to EMPTY
  14.         moveToBack(window "m_navig")
  15.         set the visible of window "m_navig" to 0
  16.         go(">16")
  17.       55, 46, 50:
  18.         if getPos(gCatenaccio, #capanne) = 0 then
  19.           add(gCatenaccio, #capanne)
  20.           mixa("omo12", 1)
  21.         end if
  22.       103, 129:
  23.         if getPos(gCatenaccio, #armi) = 0 then
  24.           add(gCatenaccio, #armi)
  25.           mixa("omo13", 1)
  26.         end if
  27.       212, 43:
  28.         if getPos(gCatenaccio, #pelli) = 0 then
  29.           add(gCatenaccio, #pelli)
  30.           mixa("omo14", 1)
  31.         end if
  32.       5, 152, 60, 19, 219, 73, 57, 65, 195, 150, 138:
  33.         set the MovieMouseClick of sprite(1) to 0
  34.         apriMessaggio("m_omo05")
  35.       250:
  36.         set the MovieMouseClick of sprite(1) to 0
  37.         apriMessaggio("m_omo06")
  38.       otherwise:
  39.         nothing()
  40.     end case
  41.   end if
  42. end
  43.  
  44. on handleNodeLeaveBerscen pFromNodeID, pToNodeID
  45.   global gCatenaccio, gInfoContext
  46.   if pToNodeID = 131 then
  47.     if count(gCatenaccio) = 3 then
  48.       set gInfoContext to "s_11"
  49.       set the MovieMouseClick of sprite(1) to 0
  50.       set oldLevel to the volume of sound 2
  51.       set the volume of sound 2 to 40
  52.       puppetSound(1, "omo14b")
  53.       repeat while soundBusy(1)
  54.         nothing()
  55.       end repeat
  56.       set the volume of sound 2 to oldLevel
  57.       set the MovieMouseClick of sprite(1) to 1
  58.       go(#next)
  59.     else
  60.       set the MovieMouseClick of sprite(1) to 0
  61.       apriMessaggio("m_omo07")
  62.       return 1
  63.     end if
  64.   end if
  65. end
  66.