home *** CD-ROM | disk | FTP | other *** search
/ Greatest Childrens Stories Ever Told / Greatest_Stories.iso / movies / animat / 3pigs.dir / 00056_Script_56 < prev    next >
Text File  |  1994-10-19  |  3KB  |  134 lines

  1. on keepname
  2.   global name
  3.   set name=the text of cast "firstname" && the text of cast "lastname" 
  4. end keepname
  5.  
  6. on setpuppets state
  7.   puppetsprite 23,state
  8.   puppetsprite 21,state
  9.   if not the soundenabled then
  10.     set the castnum of sprite 23 to the number of cast "nomusica"
  11.   end if
  12.   
  13.   if the text of cast d12="Text Off" then
  14.     set the castnum of sprite 21 to ¼
  15. the number of cast "Text Off"
  16.     puppetsprite 2, true
  17.     set the locV of sprite 2 to -500 
  18.   end if  
  19.   updatestage
  20. end setpuppets
  21.  
  22. on idle
  23.   global secs
  24.   set the timeoutLength to 3599
  25.   if the timer=the timeoutlength then
  26.     set secs=0
  27.     set the timer=0
  28.   else
  29.     put the timer/60 into secs
  30.   end if
  31.   
  32. on ansques i
  33.   global qa,done
  34.   set qa=i
  35.   set done=i
  36. end ansques
  37.  
  38. on clearvariables all
  39.   global returnframe, clicked,goforward
  40.   if all then
  41.     put 0 into returnframe
  42.     put 0 into clicked
  43.     put 0 into goforward
  44.   else 
  45.     put 0 into clicked
  46.     put 1 into goforward
  47.   end if
  48. end clearvariables
  49.  
  50. on messageWindow
  51.   global loadWindow,PopWindow
  52.   set loadWindow=PopWindow(mNew)
  53.   if loadWindow=0 then
  54.     alert"Error:  Window will not load"
  55.     exit
  56.   end if
  57. end messageWindow
  58.  
  59. on setWindowObj windowPart,left,top,width,height
  60.   windowPart(mMove,left,top)
  61.   windowpart(mSize,width,height)
  62.   windowPart(mShow)
  63. end setWindowObj
  64.  
  65.  
  66. on GetOut
  67.   global questions
  68.   if questions=1 then 
  69.     go movie "score"
  70.   else
  71.     go movie "NRMENU"
  72.   end if
  73. end GetOut
  74.  
  75.  
  76. factory PopWindow
  77. method mNew
  78.   global Windowhandler,windowNum
  79.   set theWindow=Window(mNew,#altDialog,"")
  80.   theWindow(mSetHandler,WindowHandler(mNew,theWindow))
  81.   me(mPut,1,theWindow)
  82.   
  83.   setWindowObj(theWindow,185,170,310,100)
  84.   
  85.   set part=Panel(mNew,#castBitmap,"",#Text,theWindow)
  86.   part(mSetValue,d48)
  87.   setWindowObj(part,20,10,250,15)
  88.   
  89.   set part=Panel(mNew,#pushButton,"Yes",#Yes,theWindow)
  90.   setWindowObj(part,20,50,115,20)
  91.   
  92.   set part=Panel(mNew,#pushButton,"No",#No,theWindow)
  93.   setWindowObj(part,170,50,115,20)
  94.   
  95.   theWindow(mShow)
  96.   
  97. factory WindowHandler
  98.   
  99. method mNew Window
  100.   instance myWindow, state, WindowID
  101.   set myWindow = Window
  102.   set WindowID = 1
  103.   
  104.   
  105. method mMouseUP part, h, v
  106.   if part <>0 then me(mPerform, part)
  107.   
  108.   
  109. method No
  110.   myWindow(mDispose)
  111.   
  112. method Yes
  113.   myWindow(mDispose)
  114.         GetOut()
  115.   
  116. method Text
  117.   set panelObject=myWindow(mGetPanel,#Text)
  118.   --me(mSetCast,d38)
  119.   panelObject(mSetValue,d48)
  120.   panelObject(mUpdate)
  121.   
  122.   
  123. method Nothing
  124.   exit
  125.   
  126.   
  127. method mMouseDown part, h,v
  128.   return false
  129.   
  130.   -- Update message is sent when the window is in need of repair.
  131.   
  132. method mUpdate
  133.   
  134.