Here''s a link showing the two effects that I mentioned earlier...
easier to show it then to describe it. :)
http://sample.redlinesoftware.com/effects.html
Andrew
On 6/27/05, Andrew Kaspick <akaspick@gmail.com>
wrote:> Here are two effects (with a common base) that perform a stage
> left/right effect. The effect is named after the Hanna Barbara
> character Snagglepuss. :) It shakes the contents briefly and then
> jets off (stage) to the left or right.
>
> I used the Shake effect as a guide to this one. The StageBase accepts
> the element and an "amount" to initially shake the element by.
So in
> StageLeft''s case, it moves -20 left, 40 right and then -1000 left
and
> finally renders the element hidden. The opposite holds for
> StageRight.
>
> Feel free to use it for whatever you like and any suggestions are welcome.
>
> Andrew
>
>
> Effect2.StageBase = function(element, amount) {
> new Effect2.MoveBy(element, 0, amount,
> { duration: 0.05, afterFinish: function(effect) {
> new Effect2.MoveBy(effect.element, 0, -(amount*2),
> { duration: 0.05, afterFinish: function(effect) {
> new Effect2.MoveBy(effect.element, 0, amount < 0 ? -1000 : 1000,
> { duration: 0.5, afterFinish: function(effect) {
> new Element.hide(element);
> }}) }}) }});
> }
>
> Effect2.StageLeft = function(element) {
> new Effect2.StageBase(element, -20)
> }
>
> Effect2.StageRight = function(element) {
> new Effect2.StageBase(element, 20)
> }
>