[Rails-spinoffs] Executing custom effect for n seconds

Justin Palmer
Fri, 24 Jun 2005 00:00:56 -0000

Glad to see this list get going!

I have a custom effect ''Pulse'' that basically does an opacity
fade in/
out.
I want to execute this effect with a custom duration.

I''m looking for a consistent approach that is inline with
script.alicio.us and Prototype.

Is there a way to do something like this (pseudo code):
  Effect2.Pulse = function(element) {
     new FadeIn(element, {afterFinish: new Fadeout})
}

Effect.Pulsate = function(element) {
    render(Effect2.Pulse, {duration: 10});
}

I have most of this working, but the Pulse effect only runs 1, and
when supplied with duration: n, it will take n seconds to render the
Pulse effect once.
What I would like to do is ''repeat'' this effect for a specific
duration.

Cheers,
   -Justin Palmer

----------------------------------------------
Encytemedia.com
Professional User Interface Design for Rails Applications