home *** CD-ROM | disk | FTP | other *** search
/ SuperModels in the Rainforest / SuperModels in the Rainforest.iso / rain.dxr / 00003_Utility Scripts.ls < prev    next >
Encoding:
Text File  |  1995-10-13  |  3.9 KB  |  137 lines

  1. on buttonLogic noise
  2.   set sSpritenum to the clickOn
  3.   set sCastNum to the castNum of sprite sSpritenum
  4.   set OutCastName to the name of cast sCastNum
  5.   set InCastName to the name of cast sCastNum & "In"
  6.   set the castNum of sprite sSpritenum to the number of cast InCastName
  7.   updateStage()
  8.   set flag to 1
  9.   repeat while the mouseDown
  10.     if rollOver(sSpritenum) and (flag <> 1) then
  11.       set the castNum of sprite sSpritenum to the number of cast InCastName
  12.       set flag to 1
  13.       updateStage()
  14.     end if
  15.     if not rollOver(sSpritenum) and (flag = 1) then
  16.       set the castNum of sprite sSpritenum to the number of cast OutCastName
  17.       set flag to 0
  18.       updateStage()
  19.     end if
  20.   end repeat
  21.   if the mouseUp and rollOver(sSpritenum) then
  22.     if stringp(noise) then
  23.       puppetSound(noise)
  24.     end if
  25.     set the castNum of sprite sSpritenum to the number of cast OutCastName
  26.     updateStage()
  27.     return 1
  28.   else
  29.     set the castNum of sprite sSpritenum to the number of cast OutCastName
  30.     updateStage()
  31.     return 0
  32.   end if
  33. end
  34.  
  35. on buttonLogicG noise
  36.   global giCurrentGirl
  37.   set sSpritenum to the clickOn
  38.   set sCastNum to the castNum of sprite sSpritenum
  39.   set OutCastName to the name of cast sCastNum
  40.   set InCastName to giCurrentGirl & the name of cast sCastNum & "In"
  41.   set the castNum of sprite sSpritenum to the number of cast InCastName
  42.   updateStage()
  43.   set flag to 1
  44.   repeat while the mouseDown
  45.     if rollOver(sSpritenum) and (flag <> 1) then
  46.       set the castNum of sprite sSpritenum to the number of cast InCastName
  47.       set flag to 1
  48.       updateStage()
  49.     end if
  50.     if not rollOver(sSpritenum) and (flag = 1) then
  51.       set the castNum of sprite sSpritenum to the number of cast OutCastName
  52.       set flag to 0
  53.       updateStage()
  54.     end if
  55.   end repeat
  56.   if the mouseUp and rollOver(sSpritenum) then
  57.     if stringp(noise) then
  58.       puppetSound(noise)
  59.     end if
  60.     set the castNum of sprite sSpritenum to the number of cast OutCastName
  61.     updateStage()
  62.     return 1
  63.   else
  64.     set the castNum of sprite sSpritenum to the number of cast OutCastName
  65.     updateStage()
  66.     return 0
  67.   end if
  68. end
  69.  
  70. on DStage
  71.   repeat with i = 1 to the number of castMembers
  72.     if the castType of cast i = #digitalVideo then
  73.       set the directToStage of cast i to 1
  74.       set the preLoad of cast i to 1
  75.     end if
  76.   end repeat
  77. end
  78.  
  79. on AllPuppet aBool
  80.   repeat with i = 1 to 48
  81.     if the puppet of sprite i <> aBool then
  82.       puppetSprite(i, aBool)
  83.     end if
  84.   end repeat
  85. end
  86.  
  87. on bn s1, girlNum
  88.   repeat with i = 291 to 300
  89.     set temp to the name of cast i
  90.     put girlNum into char 1 of temp
  91.     set the name of cast s1 to temp
  92.     set iTemp to s1 + 10
  93.     set the name of cast iTemp to temp & "In"
  94.     set s1 to s1 + 1
  95.   end repeat
  96. end
  97.  
  98. on ShowChanel
  99.   repeat with i = 1 to 48
  100.     put "The cast of chanell " & i && "is" && the castNum of sprite i
  101.   end repeat
  102. end
  103.  
  104. on buttonlogicLoo noise
  105.   set sSpritenum to the clickOn
  106.   set sCastNum to the castNum of sprite sSpritenum
  107.   set OutCastName to the name of cast sCastNum
  108.   set InCastName to the name of cast sCastNum & "In"
  109.   set the castNum of sprite sSpritenum to the number of cast InCastName
  110.   updateStage()
  111.   set flag to 1
  112.   repeat while the mouseDown
  113.     if rollOver(sSpritenum) and (flag <> 1) then
  114.       set the castNum of sprite sSpritenum to the number of cast InCastName
  115.       set flag to 1
  116.       updateStage()
  117.     end if
  118.     if not rollOver(sSpritenum) and (flag = 1) then
  119.       set the castNum of sprite sSpritenum to the number of cast OutCastName
  120.       set flag to 0
  121.       updateStage()
  122.     end if
  123.   end repeat
  124.   if the mouseUp and rollOver(sSpritenum) then
  125.     if stringp(noise) then
  126.       puppetSound(noise)
  127.     end if
  128.     set the castNum of sprite sSpritenum to the number of cast OutCastName
  129.     updateStage()
  130.     return 1
  131.   else
  132.     set the castNum of sprite sSpritenum to the number of cast OutCastName
  133.     updateStage()
  134.     return 0
  135.   end if
  136. end
  137.