You might find it easier to set up queues if you don't use inline
code. Create an observer in the head of your page, and then you can
keep all your code in one place and integrate the effects so they are
aware of each other's existence and state.
document.observe('dom:loaded', function(){
Element.addMethods({
attractAttention: function(obj){
new Effect.Pulsate(obj, { pulses: 3, duration: 1,
queue: this.id});
}
});
$('parentDiv').observe('mouseover',function(evt){
var elm = evt.element();
elm.identify(); //patch anything you didn't ID
switch(elm.id){
case 'foo':
$('foo_target').attractAttention();
break;
case 'bar':
$('bar_target').attractAttention();
break;
case 'baz':
$('baz_target').attractAttention();
break;
default:
break;
}
});
});
Hope this helps,
Walter
On Dec 24, 2009, at 2:19 AM, evilC wrote:
> As an afterthought, I guess it is by design.
> If you trigger it, it probably uses the current state as a starting
> point. I guess what is needed is a way to tell it to stop the current
> animation if triggered again before it finishes, or ignore subsequent
> requests until the current animation is complete.
>
> I tried queueing effects, but had no luck.
>
> --
>
> You received this message because you are subscribed to the Google
> Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
> .
>
>
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en.