I'm not sure I follow that. I should probably be more specific:
My animations are triggered by the mouseover event. There are 4
elements organized around a "spindle" and when you move the mouse over
one, they all rotate until the one you've selected is in a certain
position. The problem is that sometimes the other ones pass under the
cursor before the animation finishes, and then their mouseover event
gets triggered and it messes everything up. So I need to "lock" them
from doing anything -- and actually I should probably dealing more
with adding and removing the listener than with what I was talking
about earlier, but I think there's still a problem, because it's
time-sensitive. I need to be able to say, "When the rotation is done,
they can all be active again." The user has to have time to move the
cursor away. If I can't depend on "onend", I'm not sure what to do.
Maybe when I implement some revisions it'll work, but I'm not getting
my hopes up.
Or maybe I should just be doing mouse clicks instead of mouseover.
Come to think of it, that might be better just from an overall ease of
use perspective. But, eh, whatever, see if you can answer my question
anyway. I may still need to use "onend" for something.
--- In email@example.com, Doc <drclue@...> wrote:
> Well , one might consider the thought of having but a single animation
> pump , and a global variable containing a pointer to the target object
> to be pumped.
> In this fashion when whatever function is called to initiate the
> of a particular element , it simply replaces this one value with the
> to the new target.
> sirlemmingviii wrote:
> > Sorry for posting so many questions; I have a project due soon.
> > I'm trying to "lock" the animations of various related elements so
> > that only one of them animates at a time. So I made lock() and
> > unlock() functions that set a flag, and I put onbegin="lock()" and
> > onend="unlock()" in all of the related <animate> tags. It seems like
> > it WOULD work, except that for some reason, unlock() gets called
> > IMMEDIATELY after lock(). Which, in my estimation, has to mean that
> > onend is firing IMMEDIATELY after onbegin. How could this possibly
> > happen?
> > IE7, ASV3.
> > Here's one of the <animate> elements:
> > <animate id="grow_U" attributeName="width" attributeType="XML"
> > onbegin="lock()" onend="unlock()"
> > begin="indefinite" dur="0.2s" fill="freeze" from="40" to="600" />
> > -----
> > To unsubscribe send a message to:
> > -or-
> > visit http://groups.yahoo.com/group/svg-developers and click "edit
> > ----
> > Yahoo! Groups Links