home *** CD-ROM | disk | FTP | other *** search
- /*
- ** HorizontalScroll.fred.pre
- **
- ** $VER: HorizontalScroll.fred.pre 1.2.0 (23.10.93)
- **
- ** If the HorizontalScroll.fred scripts appears in the InvokeADPro list,
- ** this program will set up some variables.
- **
- ** Clips Exported:
- ** FREDNumberOfFrames - Total frames selected
- ** FREDXPosition - Current X Position of the frame
- ** FREDXIncrement - X Increment per frame
- ** FREDXDirection - ~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 '"HorizontalScroll.fred"' '"Choose scroll direction."' '"Left-Right|Right-Left|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE
- XDirection = 2 - RC
-
-
- /*
- ** Ask the user if the scrolled image should wrap around.
- */
-
- ADPRO_TO_FRONT
-
- OKAYN '"HorizontalScroll.fred"' '"Wrap image?"' '"Wrap|No Wrap|Cancel"'
- IF (RC = 0) THEN DO
- SCREEN_TO_FRONT "FRED"
- EXIT 10
- END
- ELSE
- RollWrap = 2 - RC
-
- SCREEN_TO_FRONT "FRED"
-
-
- /*
- ** Update the clips.
- */
-
- SETCLIP( "FREDNumberOfFrames", NumberOfFrames )
- SETCLIP( "FREDXPosition", 0 )
- SETCLIP( "FREDXIncrement", 0 )
- SETCLIP( "FREDXDirection", XDirection )
- SETCLIP( "FREDOverrideLength", 1 )
- SETCLIP( "FREDRollWrap", RollWrap )
-
- EXIT 0
-