Partly correct. beforeUpdate and afterUpdate will both fire while the effect is running [1]. Before/after each update (based roughly on your specified frames/sec and effect duration), naturally.
The callbacks available in each effect are: beforeStart Called before the main effects rendering loop is started. beforeUpdate Called on each iteration of the effects rendering loop, before the redraw takes places. afterUpdate Called on each iteration of the effects rendering loop, after the redraw takes places. afterFinish Called after the last redraw of the effect was mad You may have to poke around in the event properties or code (or, perhaps, look at the docs page linked at [1] below), but there are a handful of variables that can help you figure out what you need, notable effect.startOn, effect.finishOn, which contain the start end expected end time of the effect. TAG 1. http://wiki.script.aculo.us/scriptaculous/show/CoreEffects On Jul 5, 2007, at 1:54 PM, Diodeus wrote: > > You would have to patch into the slide functions themselves. There's a > callback on completion, but there's no callback while the function is > running. > > On Jul 5, 12:46 pm, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: >> Hi all. I'm trying to use the SlideDown/SlideUp effects to build >> nifty >> dropdown menus. I've run into a few stumbling blocks and wanted to >> run >> things by the experts. So two questions: >> >> - Is there a way to figure out the progress so far in an event? I'd >> like it so when you mouseout of menu that's in the process of sliding >> down from a mouseover, that is stop halfway and start sliding up >> immediately. This requires that I get the current percentage progress >> from the SlideDown, stop that event, and start a new SlideUp that >> starts with that value for progress. I didn't see any property in the >> effect for this. >> >> - Is there an event that fires at the end of an effect that lets me >> set a callback? Seems like that would be pretty handy. >> >> The website's article on EffectQueues was pretty handy for all >> this:http://wiki.script.aculo.us/scriptaculous/show/EffectQueues > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
