home *** CD-ROM | disk | FTP | other *** search
/ Corel Draw 6 / corel-draw-6-cd1.iso / photopnt / animate.csc < prev    next >
Text File  |  1995-08-18  |  3KB  |  126 lines

  1. REM This uses a loop to create a movie.
  2. REM Animate.csc July 20, 1995
  3.  
  4. REM This script generates an AVI file in Photo-PAINT. While the AVI file is open,
  5. REM it can take up a lot of space in memory.
  6.  
  7. DECLARE SUB DrawRectangle ()
  8.  
  9. GLOBAL TopWall%
  10. StartLeft& = 91
  11. StartTop& = 137
  12. StartRight& = 224
  13. StartBottom& = 270
  14. TopWall = 430
  15. Rate = 20
  16. NumFrames = INT((TopWall - StartBottom ) / Rate + 3)
  17.  
  18. WITHOBJECT PAINT
  19.     .FileNew 360, 500, 1, 72, 72, 0, -1, NumFrames, -1, -1, -1, -1, 255, 255, 255, 0
  20. REM     Draw The Brick Wall
  21.     DrawRectangle
  22.  
  23. REM The Yellow Face Part
  24.     .SetPaintColor 5, 0, 0, 0, 0
  25.     .PenSettings 21, 3, 0, 0, 0, 0, 0
  26.     .ShapeSettings 0, 0, 3, -1, 0
  27.     .FillSolid 5, 255, 255, 0, 0
  28.     .Ellipse StartLeft, StartTop, StartRight, StartBottom
  29.  
  30. REM The Ellipse to make the smile
  31.     .SetPaintColor 5, 0, 0, 0, 0
  32.     .PenSettings 21, 11, 0, 0, 0, 0, 0
  33.     .ShapeSettings 0, 0, 11, -1, 0
  34.     .FillSolid 5, 255, 255, 0, 0
  35.     .Ellipse StartLeft + 25, StartTop + 43, StartRight - 26, StartBottom -23
  36.  
  37. REM The Square to Cover Half the Ellipse
  38.     .PenSettings 20, 0, 0, 0, 0, 0, 0
  39.     .ShapeSettings 0, 0, 0, -1, 0
  40.     .FillSolid 5, 255, 255, 0, 0
  41.     .Rectangle StartLeft + 16, StartTop +40, StartRight - 21, StartBottom - 52
  42.  
  43. REM The Left Eye
  44.     .SetPaintColor 5, 0, 0, 0, 0
  45.     .PenSettings 21, 11, 0, 0, 0, 0, 0
  46.     .ShapeSettings 0, 0, 11, -1, 0
  47.     .FillSolid 5, 0, 0, 0, 0
  48.     .Ellipse StartLeft + 35, StartTop + 35, StartRight - 76, StartBottom - 66
  49.  
  50. REM The Right Eye
  51.     .SetPaintColor 5, 0, 0, 0, 0
  52.     .PenSettings 21, 11, 0, 0, 0, 0, 0
  53.     .ShapeSettings 0, 0, 11, -1, 0
  54.     .FillSolid 5, 0, 0, 0, 0
  55.     .Ellipse StartLeft + 76, StartTop + 35, StartRight - 35, StartBottom - 66 
  56.  
  57. REM Use the Ellipse Mask to Grab The Whole Face
  58.     .MaskEllipse StartLeft, StartTop, StartRight, StartBottom, 0, 0, 0
  59.     .EditClearClipboard    
  60.  
  61. REM Create Object From Mask
  62.     .ObjectCreate 0
  63.     .EditCopy 
  64.     .ObjectMerge 0
  65.  
  66.  
  67. REM Create The Other Frames
  68. FOR i% = 2 TO NumFrames - 3
  69.     .MovieGotoFrame i
  70.     DrawRectangle
  71.     .EditPasteObject 
  72.     .ObjectTranslate 0, 20 * i
  73.     .ObjectMerge 0
  74. NEXT I
  75.  
  76. REM Draw The Unhappy Face
  77.  
  78. REM Cover The Smile
  79.  
  80.     .SetPaintColor 5, 0, 0, 0, 0
  81.     .PenSettings 20, 0, 0, 0, 0, 0, 0
  82.     .ShapeSettings 0, -603, 0, -1, 0
  83.     .FillSolid 5, 255, 255, 0, 0
  84.     .Rectangle StartLeft + 22, TopWall - 59, StartRight - 24, TopWall - 22
  85.  
  86. REM Draw The Frown
  87.     .ColorMaskColor 0, 5, 255, 255, 0, 0, 10, 10, 10, 10
  88.     .ColorMaskCreateMask 0, 1, 0, 0
  89.     .SetPaintColor 5, 0, 0, 0, 0
  90.     .PenSettings 21, 11, 0, 0, 0, 0, 0
  91.     .ShapeSettings 0, -603, 11, -1, 0
  92.     .FillSolid 5, 255, 255, 0, 0
  93.     .Ellipse StartLeft + 30, TopWall - 53, StartRight - 30, TopWall - 12
  94.     .SetPaintColor 5, 0, 0, 0, 0
  95.     .PenSettings 20, 0, 0, 0, 0, 0, 0
  96.     .ShapeSettings 0, -603, 0, -1, 0
  97.     .FillSolid 5, 255, 255, 0, 0
  98.     .Rectangle StartLeft + 30, TopWall - 32, StartRight - 30, TopWall - 12
  99.  
  100. REM Make Object from New Face
  101.     .MaskRectangle StartLeft, TopWall - 1, StartRight, TopWall - 153, 0  
  102.     .ObjectCreate -1
  103.     .EditCopy
  104.  
  105. REM Draw The Last Two Frames
  106. FOR i% = NumFrames - 2 TO NumFrames
  107.     .MovieGotoFrame i
  108.     DrawRectangle
  109.     .EditPasteObject 
  110.     .ObjectMerge 0
  111. NEXT I
  112.  
  113. REM Delete the Face
  114.     .ObjectSelectAll
  115.     .ObjectDelete
  116. END WITHOBJECT
  117.  
  118. SUB DrawRectangle
  119. WITHOBJECT PAINT
  120.     .PenSettings 20, 1, 100, 0, 0, 0, 0
  121.     .ShapeSettings 0, 0, 1, -1, 0
  122.     .FillTexture "Samples", "Red Brick", "Surfaces"
  123.     .Rectangle 0, TopWall, 360, 500
  124. END WITHOBJECT
  125. END SUB
  126.