home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 January / Chip_1997-01_cd.bin / dirwin / data.z / ANIMWIZ.DIR / 00012_Script_Function < prev    next >
Text File  |  1996-03-15  |  990b  |  40 lines

  1. -- Function script
  2.  
  3. property iFunctionNameList
  4. property ioFunctionList
  5. property iCurrentFunction
  6. property ichTabs
  7.  
  8. on birth me
  9.   global goBanners
  10.   global goZooms
  11.   global goCredits
  12.   global goBullets
  13.   
  14.   set iFunctionNameList = ["Banners", "Zooms", "Credits", "Bullets"]
  15.   set ioFunctionList = [goBanners, goZooms, goCredits, goBullets]
  16.   set iCurrentFunction = 1
  17.   set ichTabs = 2
  18.   return me
  19. end birth
  20.  
  21.  
  22.  
  23. on mHit me
  24.   set newFunction = HitWhoH(ichTabs, count(iFunctionNameList))
  25.   if newFunction = iCurrentFunction then
  26.     return  -- clicked on the current function, don't do anything
  27.   end if
  28.   
  29.   -- Send the current object a clean up message to say we're done with it
  30.   set oCurrent = getAt(ioFunctionList, iCurrentFunction)
  31.   mCleanup(oCurrent)
  32.   
  33.   -- Finally, go to the appropriate frame of the new function
  34.   set iCurrentFunction = newFunction
  35.   set newFrameName = getAt(iFunctionNameList, iCurrentFunction)
  36.   go newFrameName
  37.   
  38. end mHit
  39.  
  40.