home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / EDG-CT1.DMS / in.adf / CT.run / Scripts2 / 5 / Gradual_Fade < prev    next >
Encoding:
Text File  |  1995-10-16  |  2.3 KB  |  106 lines

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5. Lines=7
  6. 01=Gradual Fade
  7. 02= 
  8. 03=This script loads each image of the File List Window
  9. 04=into ImageFX and Gradually fade images to another over
  10. 05=the length of frames. It divides the total number of
  11. 06=frames by the current frame number * the highest value
  12. 07=of this function to gradually adjust the list.
  13.  
  14. */
  15.  
  16. options results
  17.  
  18. arg FrameNum TotalFiles
  19. address "IMAGEFX.1"
  20.  
  21. Start = 0
  22. if FrameNum = 0 then do
  23.     FrameNum = 1
  24.     Gadget.1 = 'Select Type For Fade To Image!'
  25.     Gadget.2 = 'IMAGE'
  26.     Gadget.3 = 'SEQUENCE'
  27.     Gadget.4 = 'CLIP'
  28.     ListRequest 4 Gadget
  29.     if result = 2 then Type = "IMAGE"
  30.     if result = 3 then Type = "SEQUENCE"
  31.     if result = 4 then Type = "CLIP"
  32.  
  33.     if Type = "SEQUENCE" then do
  34.         RequestFile '"Select Path & BaseName For Fade To Image!"'
  35.         PicName = result
  36.         RequestNumber '"Select Frame Number To Start With!"' 1
  37.         Start = result-1
  38.         end
  39.     else do
  40.         RequestFile '"Select File To Use For Fade To Image!"'
  41.         PicName = result
  42.         end
  43.  
  44.     if Type = "CLIP" then do
  45.         Address CT_1 GetClipLength PicName
  46.         Start = result
  47.         RequestSlider '"Start With What Frame Of Clip!"' 1 Start 1
  48.         Start = result-1
  49.         end
  50.     Gadget.1 = 'Do You Want Fade To Buffer Scaled To Fit?'
  51.     Gadget.2 = 'YES'
  52.     Gadget.3 = 'NO'
  53.     ListRequest 3 Gadget
  54.     Answer = ""
  55.     if result = 2 then Answer = "SwapScale"
  56.  
  57.  
  58.     call open TempFile,"RAM:CT-IFGF",W
  59.     call writeln TempFile,PicName
  60.     call writeln TempFile,Type
  61.     call writeln TempFile,Start
  62.     call writeln TempFile,Answer
  63.     call close TempFile
  64.     end
  65. else do
  66.     call open TempFile,"RAM:CT-IFGF",R
  67.     line = readln(TempFile)
  68.     parse var line PicName
  69.     line = readln(TempFile)
  70.     parse var line Type
  71.     line = readln(TempFile)
  72.     parse var line Start
  73.     line = readln(TempFile)
  74.     parse var line Answer
  75.     call close TempFile
  76.     end
  77.  
  78.  
  79.  
  80. Swap
  81.  
  82. FrameNum = FrameNum + Start
  83. if Type = "CLIP" then
  84.     LoadBuffer PicName Force FrameNum
  85. if Type = "IMAGE" then
  86.     LoadBuffer PicName Force
  87. if Type = "SEQUENCE" then do
  88.     if FrameNum < 1000 then
  89.         LoadBuffer PicName""right(FrameNum,3,'0') Force
  90.     if FrameNum < 10000 then
  91.         LoadBuffer PicName""right(FrameNum,4,'0') Force
  92.     end
  93.  
  94. Swap
  95.  
  96. Num = ((FrameNum * 100)/TotalFiles)
  97. Num = trunc(Num)
  98. if FrameNum = 1 then Num = 0
  99. if FrameNum = TotalFiles then Num = 100
  100. Hook Composite MERGE Num 1 0 0 MatchMain Answer
  101.  
  102. exit
  103.  
  104.  
  105.  
  106.