This is a child page. You can use Parent in the quick nav bar at the top or the bottom of the page to navigate directly back to the parent of this page. Some child pages are more than one level deep, and in that case will require more than one Parent click to reach the outermost document level.

16.96.16 - Script/Timeline Interaction in your scripts

a=TLPOS(n)

This function returns "n" times the position of the timeline as a function of 0 to almost 1; so it will be zero at the first frame, and almost "n" at the last frame. This is intended to produce loops where the 0=1, such as rotation, where 0=360. In that case, you want the last frame of (for instance) of a 30 frame sequence to return 29/30ths instead of 30/30ths. This is because 30/30ths is technically the same thing as 0/30ths. So TLPOS(360) produces 0 at frame zero of thirty, and 348 at frame thirty of thirty... the next frame in the loop is frame zero, and that will produce zero, which is the same as 360 in terms of rotation. Simply put, to rotate continuously, use: TLPOS(360). Here's a continuously rotating asterize suitable for a looping animation:

10 A=ASTERIZE(0,0,255,0,20,TLPOS(360),7,0,1,1)

a=TPOS(n)

This function returns "n" times the position of the timeline as a function of 0 to 1; so it will be zero at the first frame, and exactly "n" at the last frame. For looping animations, TLPOS(n) is usually more appropriate. TPOS(n) generates one continuous sequence. Here is a brightness sequence from 0 to 100%, not suitable for looping:

10 A=BRIGHT(TPOS(100))
Keyboard Navigation
, Previous Page . Next Page t TOC i Index o Operators g Glossary
WinImages F/x, Morph and all associated documentation
Copyright © 1992-2007 Black Belt Systems ALL RIGHTS RESERVED Under the Pan-American Conventions
WinImages F/x Manual Version 7, Revision 6, Level A

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7
Page 274