Add new transitions to Scriptaculous
Tuesday, April 1st, 2008Not everyone knows, perhaps, but you can overwrite or add transitions effects of scriptaculous.js very easily and quickly. Scriptaculous transitions, used in effect to determine the type of animation, as those are not implemented in Flash (I recommend taking a look at this PDF of the great Robert Penner), but the final effect is - actually - the same . Moreover, the package Scriptaculous, some transitions are not present under these invence in Actionscript. If we wanted to add a new transition to Scriptaculous just add this code before you use any effect:
- = function ( pos ) { Effect. Transitions. Exponential = function (pos) (
- Math. pow ( 1 - pos , 2 ) ; return 1 - Math. pow (1 - pos, 2);
- )
From now on we can use the new transition exponential in all the effects of Scriptaculous. For a number of transitions profits - almost ported from Scriptaculous to Actionscript - see Add some spice to Scriptaculous.













There are no comments for this post
Leave a comment