home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 January / Chip_1997-01_cd.bin / dirwin / data.z / ANIMWIZ.DIR / 00011_Script_Bullets < prev    next >
Text File  |  1996-03-15  |  20KB  |  592 lines

  1. -- Bullets script
  2.  
  3. property ioFieldList
  4. property iFieldFocus
  5. property ioFieldFocus
  6. property iCurrentMotionStyleIndex
  7. property iCurrentVisualStyleIndex
  8.  
  9. -- The motion styles are:
  10. property ikMotionInstant  -- 1
  11. property ikMotionWipe  -- 2
  12. property ikMotionRoll  -- 3
  13. property ikMotionRipple  -- 4
  14.  
  15. property iFirstTIme
  16. property iSaveSeconds
  17. property iSaveFPS
  18. property iSaveDelayEnter
  19. property iSaveDelayHold
  20. property iSaveMark
  21. --property iSaveCycles
  22. property iSaveAnimateTitle
  23.  
  24. on birth me
  25.   global goBulletsText
  26.   global goSeconds
  27.   global goFPS
  28.   global goDelayEnter
  29.   global goDelayHold
  30.   
  31.   -- global goCycles
  32.   
  33.   set ioFieldList = [goBulletsText, goSeconds, goFPS, goDelayEnter, goDelayHold]
  34.   set ikMotionInstant = 1
  35.   set ikMotionWipe = 2
  36.   set ikMotionRoll = 3
  37.   set ikMotionRipple = 4
  38.   
  39.   set iCurrentMotionStyleIndex = ikMotionInstant
  40.   set iCurrentVisualStyleIndex = 1
  41.   set iFieldFocus = 1
  42.   set iFirstTime = TRUE
  43.   
  44.   return me
  45. end birth
  46.  
  47. on mInit me
  48.   global goSeconds
  49.   global goFPS
  50.   global goDelayEnter
  51.   global goDelayHold
  52.   --global goCycles
  53.   global goBullets
  54.   global goMarkFrame
  55.   global goAnimateTitle
  56.   global goVisualStyles
  57.   global goMotionStyles
  58.   global goScoreMgr
  59.   
  60.   
  61.   -- CheckMark parameter: channel
  62.   mInit(goMarkFrame, 4)  -- channel
  63.   
  64.   -- CheckMark parameter: channel
  65.   mInit(goAnimateTitle, 22)  -- channel
  66.   
  67.   if iFirstTime then  -- use intellegent defaults
  68.     mSetValue(goSeconds, 5)
  69.     mSetValue(goFPS, 5)
  70.     mSetValue(goDelayEnter, 5)
  71.     mSetValue(goDelayHold, 5)
  72.     --  mSetValue(goCycles, 1)
  73.     mSetValue(goMarkFrame, TRUE)
  74.     mSetValue(goAnimateTitle, TRUE)
  75.     set iFirstTime = FALSE
  76.   else  -- use values saved from when we last left
  77.     mSetValue(goSeconds, iSaveSeconds)
  78.     mSetValue(goFPS, iSaveFPS)
  79.     mSetValue(goDelayEnter, iSaveDelayEnter)
  80.     mSetValue(goDelayHold, iSaveDelayHold)
  81.     -- mSetValue(goCycles, iSaveCycles)
  82.     mSetValue(goMarkFrame, iSaveMark)
  83.     mSetValue(goAnimateTitle, iSaveAnimateTitle)
  84.   end if
  85.   set ioFieldFocus = GetAt(ioFieldList, iFieldFocus)
  86.   
  87.   -- RadioButtons parameters: channel, nChannels, rightAnswer, default
  88.   set goMotionStyles = 0
  89.   set goMotionStyles = birth(script "RadioButton",  26, 4, 0, iCurrentMotionStyleIndex)
  90.   
  91.   -- VisualStyles Params: castNum, default, nItems, channel
  92.   if the machineType < 256 then
  93.     mInit(goVisualStyles, the number of cast "BulletsVisualStylesMac", ¼
  94.                iCurrentVisualStyleIndex, 8, 19)
  95.   else
  96.     mInit(goVisualStyles, the number of cast "BulletsVisualStylesPC", ¼
  97.                iCurrentVisualStyleIndex, 8, 19)
  98.   end if
  99.   
  100.   -- For keystroke validity checking
  101.   set the keydownscript =  "mCheckKey(goBullets)"
  102.   
  103. end mInit 
  104.  
  105. on mSetFieldFocus me, oWhom
  106.   set where = getOne(ioFieldList, oWhom)
  107.   if where = 0 then
  108.     alert("Internal error - mSetFieldFocus could not find object")
  109.     return
  110.   end if
  111.   
  112.   set iFieldFocus = where  
  113.   set ioFieldFocus = GetAt(ioFieldList, iFieldFocus)
  114.   
  115. end mSetFieldFocus
  116.  
  117. on mCheckKey me
  118.   if the Key = TAB then -- change focus to the next field
  119.     set iFieldFocus = IncrMod(iFieldFocus, count(ioFieldList))
  120.     set ioFieldFocus = GetAt(ioFieldList, iFieldFocus)
  121.     pass  -- pass the event so the hilight goes to the next field  
  122.   else
  123.     if iFieldFocus = 1 then -- the text entry field, allow anything
  124.       pass
  125.     else  -- numeric fields, only allow digits
  126.       if (offset(the key, "0123456789") > 0) or (the key = BACKSPACE)  then
  127.         pass
  128.       else
  129.         dontPassEvent -- restrict only to digits.
  130.       end if
  131.     end if
  132.   end if
  133. end mCheckKey
  134.  
  135. on mSetNewMotionStyle me, theNewStyleIndex
  136.   set iCurrentMotionStyleIndex = theNewStyleIndex
  137. end mSetNewMotionStyle
  138.  
  139. on mSetNewVisualStyle me, theNewStyleIndex
  140.   set iCurrentVisualStyleIndex = theNewStyleIndex
  141. end mSetNewVisualStyle
  142.  
  143.  
  144.  
  145. on mValidate me
  146.   -- Attempt to validate the last field of focus
  147.   set lastFieldOKFlag = mValidate(ioFIeldFocus)
  148.   return lastFieldOKFlag
  149. end mValidate
  150.  
  151.  
  152.  
  153. on mParseField me, theTextToParse, theHeaderFont, theHeaderSize, ¼
  154.                theBodyFont, theBodySize
  155.   global gCastNumTextAsBitmap
  156.   
  157.   
  158.   set castNumHeader = mModifyRichTextCM(goCastMgr, ¼
  159.                 line 1 of theTextToParse, theHeaderFont, theHeaderSize)
  160.   if castNumHeader = 0 then  -- error
  161.     return FALSE
  162.   end if  
  163.   
  164.   --  Create a cast member in the stage movie  
  165.   set castNumHeaderTarget = mFindFreeCastRun(goCastMgr, 1, 1)
  166.   copyToClipBoard member castNumHeader
  167.   tell the stage
  168.     pasteClipboardInto member castNumHeaderTarget
  169.     set the name of member castNumHeaderTarget  = "RichText" && string(the ticks)
  170.   end tell
  171.   
  172.   set castNumList = [castNumHeaderTarget]
  173.   set maxWidth = 0
  174.   
  175.   -- The following does an effective "Convert to bitmap" into a 
  176.   -- known bitmap cast member to get size info.  
  177.   set the picture of member gCastNumTextAsBitmap = ¼
  178.         the picture of member castNumHeader
  179.   set maxWidth = the width of member gCastNumTextAsBitmap  
  180.   set heightHeader = the height of member castNumHeader / ¼
  181.                                                 the number of lines in (the text of member castNumHeader)
  182.   
  183.   repeat with thisLine = 2 to the number of lines in theTextToParse
  184.     set thisBodyLine = line thisLine of theTextToParse
  185.     -- And again for each line of the Body
  186.     set castNumBody = mModifyRichTextCM(goCastMgr, ¼
  187.                 thisBodyLine, theBodyFont, theBodySize)
  188.     if castNumBody = 0 then  -- error
  189.       return FALSE
  190.     end if  
  191.     
  192.     --  Create a cast member in the stage movie  
  193.     set castNumBodyTarget = mFindFreeCastRun(goCastMgr, 1, 1)
  194.     copyToClipBoard member castNumBody
  195.     tell the stage
  196.       pasteClipboardInto member castNumBodyTarget
  197.       set the name of member castNumBodyTarget  = "RichText" && string(the ticks)
  198.     end tell
  199.     add(castNumList, castNumBodyTarget)  
  200.     -- The following does an effective "Convert to bitmap" into a 
  201.     -- known bitmap cast member to get size info.  
  202.     set the picture of member gCastNumTextAsBitmap = ¼
  203.         the picture of member castNumBody
  204.     set thisWidth = the width of member gCastNumTextAsBitmap
  205.     if thisWidth > maxWidth then
  206.       set maxWidth = thisWidth
  207.     end if
  208.     
  209.   end repeat
  210.   set heightBody = the height of member castNumBody / ¼
  211.                                                 the number of lines in (the text of member castNumBody)
  212.   -- Finally add the maximum height and width onto the end of the list
  213.   set maxHeight = Max(heightHeader, heightBody)
  214.   add(castNumList, maxHeight)
  215.   add(castNumList, maxWidth)
  216.   
  217.   return castNumList
  218. end mParseField
  219.  
  220.  
  221.  
  222.  
  223.  
  224. on mCreate me
  225.   global goMarkFrame
  226.   global goMotionStyles
  227.   global goVisualStyles
  228.   global goScoreMgr
  229.   global goCastMgr
  230.   global gDevelopmentFlag
  231.   global gCastNumTextAsBitmap
  232.   global goAnimateTitle
  233.   
  234.   if not(mValidate(me)) then
  235.     return
  236.   end if
  237.   if the last char of field "BulletsText" = RETURN then
  238.     delete the last char of field "BulletsText"
  239.   end if
  240.   if field("BulletsText") = EMPTY then
  241.     alert("Please enter some text for the Bullet.")
  242.     return
  243.   end if
  244.   if the number of lines in field("BulletsText") < 2 then 
  245.     alert("Bullets requires at least two lines of text, one header and any number of bullets.")
  246.     return
  247.   end if
  248.   
  249.   
  250.   tell the stage
  251.     set theStageFrame = the frame
  252.   end tell
  253.   
  254.   set castNumVisualStyle = mGetCastNum(goVisualStyles, iCurrentVisualStyleIndex)
  255.   set theVisualStyleName = the name of cast castNumVisualStyle
  256.   set theHeaderFont = word 2 of theVisualStyleName
  257.   set theHeaderSize = word 3 of theVisualStyleName
  258.   set theBodyFont = word 4 of theVisualStyleName
  259.   set theBodySize = word 5 of theVisualStyleName
  260.   set theSeconds = integer(field "Seconds")
  261.   set animateTitleFlag = mGetValue(goAnimateTitle)
  262.   
  263.   set fps = integer(field "FPS")
  264.   set nFrames = integer(theSeconds * fps)
  265.   set delayEnter = integer(field "DelayEnter")
  266.   set delayHold = integer(field "DelayHold")
  267.   --  set nCycles = integer(field "Cycles")
  268.   set markFirst = mGetValue(goMarkFrame)
  269.   
  270.   
  271.   set theForeColor  = 255
  272.   set theBackColor  = 0
  273.   
  274.   --Insert bullet characters (or dashes) before bullets lines
  275.   if the machineType < 256 then
  276.     set charsToPrepend = "ò  "
  277.   else
  278.     set charsToPrepend = "-  "
  279.   end if
  280.   set nSourceLines = the number of lines in field "BulletsText"
  281.   set theSourceText = field "BulletsText"
  282.   repeat with thisLine = 2 to nSourceLines
  283.     put charsToPrepend before line thisLine of theSourceText
  284.   end repeat
  285.   
  286.   -- The returned List contains a list of generated cast members to display
  287.   --  item 1 is the Header, all others are bullets
  288.   --  the last item is the maximum width
  289.   set bulletsList = mParseField(me, theSourceText,¼
  290.                            theHeaderFont, theHeaderSize, theBodyFont, theBodySize)
  291.   if bulletsList = FALSE then --error
  292.     return
  293.   end if
  294.   
  295.   -- Pull maxWidth off the end of the list
  296.   set widthIndex = count(bulletsList)
  297.   set maxWidth = getAt(bulletsList, widthIndex)
  298.   deleteAt(bulletsList, widthIndex)  
  299.   -- Pull maxHeight off end of the list
  300.   set heightIndex = count(bulletsList)
  301.   set maxHeight = getAt(bulletsList, heightIndex)
  302.   deleteAt(bulletsList, heightIndex)  
  303.   
  304.   set theStageWidth = mGetStageWidth(goScoreMgr)
  305.   set leftEdge = integer((theStageWidth / 2) - (maxWidth / 2))
  306.   set theStageHeight = mGetStageHeight(goScoreMgr)
  307.   set nextV = integer((theStageHeight / 2) - ((nSourceLines * value(maxHeight))/ 2))
  308.   set locVList = []
  309.   repeat with thisLine = 1 to nSourceLines
  310.     add(locVList, nextV)
  311.     set nextV = nextV + value(maxHeight)
  312.   end repeat
  313.   
  314.   case iCurrentMotionStyleIndex of  
  315.     ikMotionInstant: 
  316.       set thisTransition = "Dissolve, Pixels Fast"
  317.       if animateTitleFlag then
  318.         --        set nFrames = delayEnter
  319.         set nFrames = 1
  320.       else
  321.         --        set nFrames = delayEnter + delayHold
  322.         set nFrames = 2
  323.       end if 
  324.       
  325.     ikMotionWipe:
  326.       set thisTransition = "Wipe Down"
  327.       if animateTitleFlag then
  328.         --        set nFrames = delayEnter
  329.         set nFrames = 1
  330.       else
  331.         --        set nFrames = delayEnter + delayHold
  332.         set nFrames =  2
  333.       end if 
  334.       
  335.     ikMotionRoll:
  336.       set thisTransition = 0
  337.       --      set nFramesPerTransition = (theSeconds * fps) + delayHold
  338.       set nFramesPerTransition = (theSeconds * fps) + 1
  339.       if animateTitleFlag then
  340.         set nFrames = nFramesPerTransition * nSourceLines
  341.       else
  342.         --        set nFrames = (nFramesPerTransition * (nSourceLines - 1)) + delayEnter
  343.         set nFrames = (nFramesPerTransition * (nSourceLines - 1)) + 1
  344.       end if 
  345.       
  346.     ikMotionRipple:
  347.       set thisTransition = 0
  348.       set nAnimationFrames = (theSeconds * fps) 
  349.       if animateTitleFlag then
  350.         --        set nFrames = nAnimationFrames + delayHold
  351.         set nFrames = nAnimationFrames + 1
  352.       else
  353.         set nFrames =  nAnimationFrames + 2
  354.         --        set nFrames = nAnimationFrames + delayEnter + delayHold
  355.       end if 
  356.       
  357.   end case
  358.   
  359.   -- Call the ScoreMgr to set up the score, # of frames, and nSourceLines channels
  360.   if not(mInit(goScoreMgr, nFrames, nSourceLines)) then
  361.     return
  362.   end if
  363.   
  364.   -- Create a list of available channels from the users selection
  365.   set chList = []
  366.   repeat with i = 1 to nSourceLines
  367.     set chNext = mGetNextSelectedChannel(goScoreMgr)
  368.     add(chList, chNext)
  369.   end repeat
  370.   set theFrameNum = mGetStartFrame(goScoreMgr)
  371.   
  372.   -- Mark first frame upon request
  373.   if markFirst  then
  374.     set theLabel  = "AW.Bullet." & word 1 of the text of field "BulletsText" & " " & ¼
  375.               mGetGeneratedScoreSelection(goScoreMgr)
  376.     mWriteFrameLabel(goScoreMgr, theFrameNum, theLabel)
  377.   end if
  378.   
  379.   -- If we're not animating the title, put it into the score
  380.   if not(animateTitleFlag) then 
  381.     if thisTransition <> 0 then
  382.       mWriteFrameControl(goScoreMgr, theFrameNum, #Transition, thisTransition)
  383.     end if
  384.     set chHeader = getAt(chList, 1)
  385.     set castNumHeader = getAt(bulletsList, 1)
  386.     set locVHeader = getAt(locVList, 1)
  387.     --    repeat with i = 1 to delayEnter
  388.     --      mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, 1)
  389.     --    mWriteSprite(goScoreMgr, theFrameNum, chHeader, castNumHeader, ¼
  390. --                     theForeColor, theBackColor, leftEdge, locVHeader, 0, 0)  
  391.     --    set theFrameNum = theFrameNum + 1
  392.     --    end repeat
  393.     mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, -delayEnter)
  394.     mWriteSprite(goScoreMgr, theFrameNum, chHeader, castNumHeader, ¼
  395.                      theForeColor, theBackColor, leftEdge, locVHeader, 0, 0)  
  396.     set theFrameNum = theFrameNum + 1
  397.   end if
  398.   
  399.   
  400.   if (iCurrentMotionStyleIndex = ikMotionInstant) or ¼
  401.       (iCurrentMotionStyleIndex = ikMotionWipe)  then 
  402.     
  403.     mWriteFrameControl(goScoreMgr, theFrameNum, #Transition, thisTransition)
  404.     
  405.     -- *****   repeat with i = 1 to delayHold
  406.  
  407.         repeat with thisItem = 1 to nSourceLines
  408.           set chItem = getAt(chList, thisItem)
  409.           set castNumItem = getAt(bulletsList, thisItem)
  410.           set locVItem = getAt(locVList, thisItem)
  411.           -- *****mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, 1)
  412.           mWriteFrameControl(goScoreMgr,theFrameNum,#Tempo, -delayHold)
  413.           mWriteSprite(goScoreMgr, theFrameNum, chItem, castNumItem, ¼
  414.                      theForeColor, theBackColor, leftEdge, locVItem, 0, 0)  
  415.         end repeat
  416.         set theFrameNum = theFrameNum + 1
  417.   
  418.     
  419.     -- *****   end repeat
  420.     
  421.     
  422.   else  -- ikMotionRoll or ikMotionRipple
  423.     
  424.     set theStageRight = mGetStageRight(goScoreMgr)
  425.     set offStagePos = theStageRight + 10
  426.     if animateTitleFlag then
  427.       set startItem = 1
  428.       set locHList = []
  429.     else
  430.       set startItem = 2
  431.       set locHList = [leftEdge]  -- start the title already at the left edge
  432.     end if 
  433.     
  434.     
  435.     if (iCurrentMotionStyleIndex = ikMotionRoll) then  -- Roll
  436.       -- Create the starting locH list, start all offstage right
  437.       repeat with i = startItem to nSourceLines
  438.         add(locHList, offStagePos)
  439.       end repeat
  440.       set nFramesPerAnimation = theSeconds * fps
  441.       set hInc = float(leftEdge - offStagePos) / float(nFramesPerAnimation) 
  442.       
  443.       repeat with thisBullet = startItem to nSourceLines
  444.         set thisH = getAt(locHList, thisBullet)
  445.         mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, fps)
  446.         tell the stage
  447.           beginRecording
  448.             repeat while thisH > leftEdge
  449.               -- Move the affected bullet
  450.               set thisH = integer(thisH + hInc)
  451.               if thisH < leftEdge then
  452.                 set thisH = leftEdge
  453.               end if
  454.               setAt(locHList, thisBullet, thisH)
  455.               -- Write out all sprites in this frame
  456.               repeat with thisItem = 1 to nSourceLines
  457.                 set chItem = getAt(chList, thisItem)
  458.                 set castNumItem = getAt(bulletsList, thisItem)
  459.                 set locVItem = getAt(locVList, thisItem)
  460.                 set locHItem = getAt(locHList, thisItem)
  461.                 mWriteSpriteRange(goScoreMgr, theFrameNum, chItem, castNumItem, ¼
  462.                      theForeColor, theBackColor, locHItem, locVItem, 0, 0)  
  463.               end repeat  -- this Item
  464.               set theFrameNum = theFrameNum + 1
  465.               
  466.             end repeat  -- thisH
  467.           endRecording
  468.         end tell
  469.         -- Now generate hold frames at the end 
  470.         --****        repeat with i = 1 to delayHold
  471.         --****      mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, 1)
  472.         mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, -delayHold)
  473.         repeat with thisItem = 1 to nSourceLines
  474.           set chItem = getAt(chList, thisItem)
  475.           set castNumItem = getAt(bulletsList, thisItem)
  476.           set locVItem = getAt(locVList, thisItem)
  477.           set locHItem = getAt(locHList, thisItem)
  478.           
  479.           mWriteSprite(goScoreMgr, theFrameNum, chItem, castNumItem, ¼
  480.                      theForeColor, theBackColor, locHItem, locVItem, 0, 0)  
  481.         end repeat
  482.         set theFrameNum = theFrameNum + 1
  483.         --****            end repeat   -- delay Frames    
  484.         
  485.       end repeat  -- thisBullet
  486.       
  487.     else  -- ikMotionRipple
  488.       -- Build the locH starting list staggered
  489.       
  490.       -- nAnimationFrames tell you how many frames of animation we have
  491.       -- from this, we calculate the staggerOffset, and the horizontal increment.
  492.       set nBulletsToMove = nSourceLines - startItem + 1
  493.       set pctOverlap = 0.25  -- percentage of overlap
  494.       set hDistance1Line = float(leftEdge - offStagePos)
  495.       set effectiveNLines = 1.0 + (pctOverLap * nBulletsToMove)
  496.       set totalHDistance = effectiveNLines * hDistance1Line
  497.       set hInc = totalHDistance / float(nAnimationFrames)      
  498.       set staggerOffset = -1 * integer(hDistance1Line * pctOverLap)
  499.       
  500.       set multiplier  = 0
  501.       repeat with thisItem = startItem to nSourceLines
  502.         set startingPos = offStagePos + (multiplier * staggerOffset)
  503.         add(locHList, startingPos)
  504.         set multiplier = multiplier + 1
  505.       end repeat      
  506.       
  507.       
  508.       mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, fps)
  509.       tell the stage
  510.         beginrecording
  511.           repeat with animFrame = 1 to nAnimationFrames
  512.             -- Write out all sprites in this frame using their h and v loc's
  513.             repeat with thisBullet = 1 to nSourceLines
  514.               set chItem = getAt(chList, thisBullet)
  515.               set castNumItem = getAt(bulletsList, thisBullet)
  516.               set locVItem = getAt(locVList, thisBullet)
  517.               set locHItem = getAt(locHList, thisBullet)
  518.               mWriteSpriteRange(goScoreMgr, theFrameNum, chItem, castNumItem, ¼
  519.                      theForeColor, theBackColor, locHItem, locVItem, 0, 0)
  520.               
  521.               -- Now, slide that bullet if needed
  522.               if locHItem > leftEdge then
  523.                 set thisH = integer(locHItem + hInc)
  524.                 if thisH < leftEdge then
  525.                   set thisH = leftEdge
  526.                 end if
  527.                 setAt(locHList, thisBullet, thisH)
  528.               end if         
  529.             end repeat -- thisBullet
  530.             set theFrameNum = theFrameNum + 1
  531.           end repeat -- animFrame
  532.         endRecording
  533.       end tell
  534.       
  535.       -- Now generate hold frames at the end 
  536.       --****   repeat with i = 1 to delayHold
  537.       --****     mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, 1)
  538.       mWriteFrameControl(goScoreMgr, theFrameNum, #Tempo, -delayHold)
  539.       repeat with thisItem = 1 to nSourceLines
  540.         set chItem = getAt(chList, thisItem)
  541.         set castNumItem = getAt(bulletsList, thisItem)
  542.         set locVItem = getAt(locVList, thisItem)
  543.         
  544.         mWriteSprite(goScoreMgr, theFrameNum, chItem, castNumItem, ¼
  545.                      theForeColor, theBackColor, leftEdge, locVItem, 0, 0)  
  546.       end repeat
  547.       set theFrameNum = theFrameNum + 1
  548.       --****     end repeat   -- delay Frames    
  549.       
  550.     end if  -- ikMotionRipple   
  551.     
  552.   end if  -- ikMotionRoll or ikMotionRipple
  553.   
  554.   go  label("Bullets") + 2  -- to display reselect button
  555.   
  556.   if not(gDevelopmentFlag) then
  557.     tell the stage
  558.       go frame theStageFrame
  559.     end tell
  560.   end if 
  561.   
  562.   mClean(goScoreMgr)
  563.   
  564. end mCreate
  565.  
  566.  
  567.  
  568. on mCleanup me
  569.   global goMotionStyles
  570.   global goAnimateTitle
  571.   global goSeconds
  572.   global goFPS
  573.   global goDelayEnter
  574.   global goDelayHold
  575.   --global goCycles
  576.   global goMarkFrame
  577.   
  578.   mCleanup(goMotionStyles)
  579.   
  580.   set iSaveSeconds =  mGetValue(goSeconds)
  581.   set iSaveFPS = mGetValue(goFPS)
  582.   set iSaveDelayEnter = mGetValue(goDelayEnter)
  583.   set iSaveDelayHold = mGetValue(goDelayHold)
  584.   --set iSaveCycles = mGetValue(goCycles)  
  585.   set iSaveMark = mGetValue(goMarkFrame)  
  586.   set iSaveAnimateTitle = mGetValue(goAnimateTitle)  
  587.   
  588.   mCleanup(goMarkFrame)
  589.   mCleanup(goAnimateTitle)  
  590. end mCleanup
  591.  
  592.