home *** CD-ROM | disk | FTP | other *** search
/ The Stock Market: Browser - Disc 1 / TheStockMarketRoyaltyFreeImages-BrowserDisc1-WinMac.bin / mac / Deutsch / Main.dir / 00003_Script_TSMButton < prev    next >
Text File  |  2000-02-10  |  2KB  |  116 lines

  1. property SpriteNum, buttNameUp, buttNameRoll, buttNameDown, onScreen, Status, ShadowSprite, hpos, vpos, shadowPosH, shadowPosV, myJob
  2.  
  3.  
  4. on new me, spriteNumber, buttonName, h2Pos, v2Pos, Stat, buttonJob
  5.   
  6.   put stat into Status
  7.   if status = 0 then 
  8.     set the loc of sprite SpriteNum to point (9000,9000)
  9.   end if
  10.   
  11.   put h2Pos into hPos
  12.   put v2Pos into vPos
  13.   
  14.   put SpriteNumber into SpriteNum
  15.   put buttonName&"Up" into buttNameUp
  16.   put buttonName&"UpRoll" into buttNameRoll
  17.   put buttonName&"Down" into buttNameDown
  18.   
  19.   put buttonJob into myJob
  20.   
  21.   return me
  22. end
  23.  
  24.  
  25. on everyframe me
  26.   if status = 1 then
  27.     if rollover(SpriteNum) then
  28.       set the member of sprite SpriteNum = member buttNameRoll of castlib "buttons16"
  29.     else
  30.       set the member of sprite SpriteNum = member buttNameUp of castlib "buttons16"
  31.     end if
  32.   end if
  33.   return me
  34. end
  35.  
  36.  
  37. on activate me
  38.   
  39.   if status = 2 then
  40.     do myJob
  41.   end if
  42.   
  43.   if status = 1 then
  44.     BDN1
  45.     set status = 2
  46.     if hPos <> 0 then
  47.       set the loc of sprite SpriteNum to point(hPos,vPos)
  48.     end if
  49.     
  50.     set the member of sprite SpriteNum = member buttNameDown of castlib "buttons16"
  51.     updateStage
  52.     do myJob
  53.     exit
  54.   end if
  55.   return me
  56. end 
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. on superActivate me
  64.   
  65.   set status = 2
  66.   if hPos <> 0 then
  67.     set the loc of sprite SpriteNum to point(hPos,vPos)
  68.   end if
  69.   set the member of sprite SpriteNum = member buttNameDown of castlib "buttons16"
  70.   return me
  71. end
  72.  
  73.  
  74. on SuperDeActivate me
  75.   
  76.   set the member of sprite SpriteNum = member buttNameUp of castlib "buttons16"
  77.   set status = 1
  78.   if hPos <> 0 then
  79.     set the loc of sprite SpriteNum to point(hPos,vPos)
  80.   end if
  81.   return me
  82. end
  83.  
  84.  
  85. on deactivate me
  86.   
  87.   set the member of sprite SpriteNum = member buttNameUp of castlib "buttons16"
  88.   set status = 1
  89.   return me
  90. end
  91.  
  92.  
  93.  
  94.  
  95. on TurnOn Me
  96.   
  97.   
  98.   --  if status <> 1 then
  99.   set the loc of sprite SpriteNum to point(hPos,vPos)
  100.   set status = 1 
  101.   
  102.   --  end if
  103.   return me
  104. end
  105.  
  106.  
  107.  
  108.  
  109.  
  110. on TurnOff me
  111.   set the loc of sprite SpriteNum to point (9000,9000)
  112.   set status = 0
  113.   return me
  114. end
  115.  
  116.