it's easy to pass the options (duration etc) through to you effect call:
Pulsator = Class.create();
Pulsator.prototype = {initialize: function(element,options)
{
this.options = options || {};
this.options.afterFinish = this.action.bind(this);
this.stopped = false;
new Effect.Pulsate(element, this.options);
},
action: function(element){
if(!this.stopped) new Effect.Pulsate (element,this.options);
},
stop: function(element) {
this.stopped = true;
}
}
simple call:
var pulsator = new Pulsator(myelement, { duration: 0.3 });
hth
Sigi
On 5/28/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Hi * and thanks for you responses
some body help me stop effect, just last effect.
Thanks! to somebody help me with:
Pulsator = Class.create();
Pulsator.prototype = {initialize: function(element)
{
this.stopped = false;
new Effect.Pulsate(element, { afterFinish:
this.action.bind(this) });
},action: function(element){if(!this.stopped) new
Effect.Pulsate (element,
{ afterFinish: this.action.bind(this) });
},stop: function(element) {this.stopped = true;}
}
but this solution work to stop but it lost duration feature
thanks in advance
rag
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
--
Mit freundlichen Grüßen
Siegfried Puchbauer
_______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
