home *** CD-ROM | disk | FTP | other *** search
- /*
- ** VerticalScroll.fred.pre
- **
- ** $VER: VerticalScroll.fred.pre 1.2.0 (23.10.93)
- **
- ** If the VerticalScroll.fred scripts appears in the InvokeADPro list,
- ** this program will set up some variables.
- **
- ** Clips Exported:
- ** FREDNumberOfFrames - Total frames selected
- ** FREDYPosition - Current Y Position of the frame
- ** FREDYIncrement - Y Increment per frame
- ** FREDYDirection - ~0 if movement is to the right
- ** 0 if to the left
- ** FREDRollWrap - ~0 if image should wrap around
- ** 0 if not
- ** FREDOverrideLength - Set this to 1
- **
- ** NOTE: Clip names are case sensitive.
- **
- ** This script requires FRED v1.4.0 (or higher) to run. Also required is
- ** ADPro v2.5.0 (or higher).
- **
- ** Copyright © 1992-1993 ASDG, Incorporated
- ** All Rights Reserved
- */
-
-
- ADDRESS "ADPro"
- OPTIONS RESULTS
-
- PARSE ARG NumberOfCells NumberOfFrames
-
- NL = '0A'X
- SQ = '27'X
- DQ = '22'X
- TRUE = 1
- FALSE = 0
-
-
- /*
- ** Ensure that at least two frames are to be processed.
- */
-
- IF (NumberOfFrames < 2) THEN DO
- ADPRO_TO_FRONT
- OKAY1 "Frame count must be more than 2"
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
-
-
- /*
- ** Ask the user in which direction (left or right) the image should scroll.
- */
-
- ADPRO_TO_FRONT
-
- OKAYN '"VerticalScroll.fred"' '"Set scroll direction"' '"Top-Bottom|Bottom-Top|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE
- YDirection = 2 - RC
-
-
- /*
- ** Ask the user if the scrolled image should wrap around.
- */
-
- ADPRO_TO_FRONT
-
- OKAYN '"VerticalScroll.fred"' '"Wrap Image?"' '"Wrap Around|No Wrapping|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE
- RollWrap = 2 - RC
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDNumberOfFrames", NumberOfFrames )
- SETCLIP( "FREDYPosition", 0 )
- SETCLIP( "FREDYIncrement", 0 )
- SETCLIP( "FREDYDirection", YDirection )
- SETCLIP( "FREDOverrideLength", 1 )
- SETCLIP( "FREDRollWrap", RollWrap )
-
- EXIT 0
-