Site Navigation
vegUISiteKit - Effect: Morph
written by vegu on 16 Mar, 2007 11:02:46
The morph effect - odd name i agree, must have been late when i named it - allows you to grow,shrink or move a node in a smooth animation. This is cool for popup effects or collapsing and expanding of elements.
As soon as the morph effect library is included the method
fx_morph() is added to the VSK_Node object.
The first two arguments of the method define the size that the node will morph to in the time of the effect - width and height respectivly. Argument 3 and 4 are the coordinates that the node should move to in the time of the effect - x and y respectively and the last argument is the time of the effect (ms).
Examples:
var n = v(myNode).resize(50,50);
n.fx_morph(100,100,null,null,1000);
n.fx_morph(n.w(), n.h(),100,100,1000);
n.fx_morph(100,100,100,100,1000);
Currently the only way to keep the node from resizing is the submit the node's current width and height to the function. I will most likely make it so you can submit null as well in order to omit the resizing part as i did with the movement part.
Related Posts
Your Comment
Comments
No comments yet.