Canvas Animation Library
 

start Library Method

Short Description: Start transition

Signature: t.start ()
Group: Control
Class: transition Class
 

Starts the transition. As long as start is not called the transition will not be executed.

Normal use of start is to first set options and parameters of the transition and then call start once. Afterwards Info methods can still be used to retrieve information about the transition. Also a, cont, or contAccel are useful to create continuing transitions.

taccgl.actor("text").rotateMiddle(0,1,0).dur(2).start(); RUN

In special situations start can be called multiple times in order to update options and parameters of an existing transition. This can be done before, while, or after the transition is actually performed.

W.r.t. the following examples, the frist line creates a transition and stores it into a global variable runningstep. All of the following lines update this runningstep and consequently work only after the first line was executed.

runningstep = taccgl.actor("text").rotateMiddle(0,1,0).dur(5).start(); RUN
runningstep.startTime(0).dur(5).start(); RUN
runningstep.color('red').start(); RUN
runningstep.rotatePart(4*Math.PI,2*Math.PI).absStartTime(2*taccgl.currenttime-5).start(); RUN
runningstep.to(runningstep.x,runningstep.y+500,0).start(); RUN
runningstep.to(runningstep.x,runningstep.y,0).start(); RUN
runningstep.dur(0.001).start(); RUN
Next Page:transition.stop - Stop running transition
Previous Page: transition.showAfter - Display object after duration
Please Add a Comment or Question, click here!