home *** CD-ROM | disk | FTP | other *** search
- /*
- * Template.ifx
- * Written by Thomas Krehbiel
- *
- * Template for AutoFX scripts.
- *
- * Inputs:
- * Word(Arg(1),1) = Frame number (1 - N)
- * Word(Arg(1),2) = Main filename ("-" if not specified)
- * Word(Arg(1),3) = Swap filename ("-" if not specified)
- * Word(Arg(1),4) = Sequence number (?)
- * Word(Arg(1),5) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- */
-
- OPTIONS RESULTS
-
- framenum = Word(Arg(1),1)
- mainname = Word(Arg(1),2)
- swapname = Word(Arg(1),3)
- seqnum = Word(Arg(1),4)
- framemax = Word(Arg(1),5)
-
- minradius = GETCLIP('Autofx_RadialStar_Min')
- maxradius = GETCLIP('Autofx_RadialStar_Max')
- centerx = GETCLIP('Autofx_RadialStar_CenterX')
- centery = GETCLIP('Autofx_RadialStar_CenterY')
-
- GetMain
- IF rc ~= 0 THEN EXIT rc
- PARSE VAR result name width height .
-
- IF centerx = -1 THEN centerx = width % 2
- IF centery = -1 THEN centery = height % 2
-
- angle = framenum * 360 % (framemax+1)
- points = 5
-
- IF framenum >= framemax%2 THEN
- radius = minradius + ((maxradius - minradius + 1) * (framemax-framenum) % (framemax%2))
- ELSE
- radius = minradius + ((maxradius - minradius + 1) * framenum % (framemax%2))
-
- thick = radius % 4
-
- Hook RadialStar radius points thick angle 'CENTERX' centerx 'CENTERY' centery
-
- EXIT
-