home *** CD-ROM | disk | FTP | other *** search
/ Fuji Wa La Te I Ka - Hyakunin Isshu Karuta / KARUTA.bin / wins / yomu.dir / 00218_Script_218 < prev    next >
Text File  |  1995-11-10  |  2KB  |  73 lines

  1. on StartMovie
  2.   global CUL, sNAME,karuta,OLD_CUL
  3.   puppetSprite 4, true
  4.   --  puppetSprite 5, true  
  5.   --  set the castNum of sprite 4 to the number of cast  (CUL+100)
  6.   --  set the castNum of sprite 5 to the number of cast  CUL
  7.   --  set the locH of sprite 5 to 261
  8.   --  set the locV of sprite 5 to 5
  9.   Initnumber CUL
  10.   --  sound fadeout 2, 120
  11.   set karuta = []
  12.   repeat with i = 1 to 100
  13.     add karuta , i
  14.   end repeat
  15.   set OLD_CUL = 101
  16.   tell the stage
  17.     go to frame"ROUDOKU"
  18.   end tell
  19. end
  20.  
  21. on StopMovie
  22.   puppetSprite 1, false
  23.   puppetSprite 4, false
  24.   puppetSprite 5, false
  25.   tell the stage
  26.     go to frame"toMAP"
  27.   end tell
  28. end
  29.  
  30. on RNDSELECT
  31.   global CUL, sNAME,Karuta
  32.   if count(karuta) = 0 then
  33.     play done
  34.   else
  35.     set listct = count(karuta)
  36.     set dtct = random(listct)
  37.     set CUL = getAt(karuta,dtct)
  38.     deleteAt karuta, dtct
  39.     --  put random(100) into CUL
  40.     Initnumber CUL
  41.     set the castNum of sprite 4 to the number of cast  (CUL+100)
  42.   end if
  43. end
  44.  
  45. on Initnumber x
  46.   global CUL,sNAME
  47.   if length(String(x)) = 1 then set sNAME = "00"&string(x)
  48.   else if length(String(x)) = 2 then set sNAME = "0"&string(x)
  49.   else if length(String(x)) = 3 then set sNAME = string(x)
  50. end
  51. on PushB2
  52.   puppetSound "PUSH_SE"
  53.   put item 1 of the name of cast the castNum of sprite clickOn() into cName
  54.   repeat while stilldown()
  55.     if rollover(clickOn()) then
  56.       set the castNum of sprite clickOn() = the number of cast (cName & ",DW")
  57.     else
  58.       set the castNum of sprite clickon() = the Number of cast (cName & ",UP")
  59.     end if
  60.     updatestage
  61.   end repeat
  62.   set the castNum of sprite clickon() = the Number of cast (cName & ",UP")
  63.   updatestage 
  64.   return TRUE
  65.   
  66.   puppetSound 0
  67.   
  68. end
  69.  
  70. on return_M
  71.   go to movie "ROUDOKU"
  72. end
  73.