home *** CD-ROM | disk | FTP | other *** search
- REM This uses a loop to create a movie.
- REM Animate.csc July 20, 1995
-
- REM This script generates an AVI file in Photo-PAINT. While the AVI file is open,
- REM it can take up a lot of space in memory.
-
- DECLARE SUB DrawRectangle ()
-
- GLOBAL TopWall%
- StartLeft& = 91
- StartTop& = 137
- StartRight& = 224
- StartBottom& = 270
- TopWall = 430
- Rate = 20
- NumFrames = INT((TopWall - StartBottom ) / Rate + 3)
-
- WITHOBJECT PAINT
- .FileNew 360, 500, 1, 72, 72, 0, -1, NumFrames, -1, -1, -1, -1, 255, 255, 255, 0
- REM Draw The Brick Wall
- DrawRectangle
-
- REM The Yellow Face Part
- .SetPaintColor 5, 0, 0, 0, 0
- .PenSettings 21, 3, 0, 0, 0, 0, 0
- .ShapeSettings 0, 0, 3, -1, 0
- .FillSolid 5, 255, 255, 0, 0
- .Ellipse StartLeft, StartTop, StartRight, StartBottom
-
- REM The Ellipse to make the smile
- .SetPaintColor 5, 0, 0, 0, 0
- .PenSettings 21, 11, 0, 0, 0, 0, 0
- .ShapeSettings 0, 0, 11, -1, 0
- .FillSolid 5, 255, 255, 0, 0
- .Ellipse StartLeft + 25, StartTop + 43, StartRight - 26, StartBottom -23
-
- REM The Square to Cover Half the Ellipse
- .PenSettings 20, 0, 0, 0, 0, 0, 0
- .ShapeSettings 0, 0, 0, -1, 0
- .FillSolid 5, 255, 255, 0, 0
- .Rectangle StartLeft + 16, StartTop +40, StartRight - 21, StartBottom - 52
-
- REM The Left Eye
- .SetPaintColor 5, 0, 0, 0, 0
- .PenSettings 21, 11, 0, 0, 0, 0, 0
- .ShapeSettings 0, 0, 11, -1, 0
- .FillSolid 5, 0, 0, 0, 0
- .Ellipse StartLeft + 35, StartTop + 35, StartRight - 76, StartBottom - 66
-
- REM The Right Eye
- .SetPaintColor 5, 0, 0, 0, 0
- .PenSettings 21, 11, 0, 0, 0, 0, 0
- .ShapeSettings 0, 0, 11, -1, 0
- .FillSolid 5, 0, 0, 0, 0
- .Ellipse StartLeft + 76, StartTop + 35, StartRight - 35, StartBottom - 66
-
- REM Use the Ellipse Mask to Grab The Whole Face
- .MaskEllipse StartLeft, StartTop, StartRight, StartBottom, 0, 0, 0
- .EditClearClipboard
-
- REM Create Object From Mask
- .ObjectCreate 0
- .EditCopy
- .ObjectMerge 0
-
-
- REM Create The Other Frames
- FOR i% = 2 TO NumFrames - 3
- .MovieGotoFrame i
- DrawRectangle
- .EditPasteObject
- .ObjectTranslate 0, 20 * i
- .ObjectMerge 0
- NEXT I
-
- REM Draw The Unhappy Face
-
- REM Cover The Smile
-
- .SetPaintColor 5, 0, 0, 0, 0
- .PenSettings 20, 0, 0, 0, 0, 0, 0
- .ShapeSettings 0, -603, 0, -1, 0
- .FillSolid 5, 255, 255, 0, 0
- .Rectangle StartLeft + 22, TopWall - 59, StartRight - 24, TopWall - 22
-
- REM Draw The Frown
- .ColorMaskColor 0, 5, 255, 255, 0, 0, 10, 10, 10, 10
- .ColorMaskCreateMask 0, 1, 0, 0
- .SetPaintColor 5, 0, 0, 0, 0
- .PenSettings 21, 11, 0, 0, 0, 0, 0
- .ShapeSettings 0, -603, 11, -1, 0
- .FillSolid 5, 255, 255, 0, 0
- .Ellipse StartLeft + 30, TopWall - 53, StartRight - 30, TopWall - 12
- .SetPaintColor 5, 0, 0, 0, 0
- .PenSettings 20, 0, 0, 0, 0, 0, 0
- .ShapeSettings 0, -603, 0, -1, 0
- .FillSolid 5, 255, 255, 0, 0
- .Rectangle StartLeft + 30, TopWall - 32, StartRight - 30, TopWall - 12
-
- REM Make Object from New Face
- .MaskRectangle StartLeft, TopWall - 1, StartRight, TopWall - 153, 0
- .ObjectCreate -1
- .EditCopy
-
- REM Draw The Last Two Frames
- FOR i% = NumFrames - 2 TO NumFrames
- .MovieGotoFrame i
- DrawRectangle
- .EditPasteObject
- .ObjectMerge 0
- NEXT I
-
- REM Delete the Face
- .ObjectSelectAll
- .ObjectDelete
- END WITHOBJECT
-
- SUB DrawRectangle
- WITHOBJECT PAINT
- .PenSettings 20, 1, 100, 0, 0, 0, 0
- .ShapeSettings 0, 0, 1, -1, 0
- .FillTexture "Samples", "Red Brick", "Surfaces"
- .Rectangle 0, TopWall, 360, 500
- END WITHOBJECT
- END SUB
-