Thanks Aaron - unless I don't understand what you're saying, but that would do just the opposite - I like to kill the current effect immediately if it is running and show the new message?!
On Jan 8, 3:11 pm, Aaron Newton <[email protected]> wrote: > might I suggest Chain.Wait? > > http://mootools.net/docs/more/Class/Chain.Wait > > demo: > > http://www.clientcide.com/wiki/cnet-libraries/01.1-class.extras/01-ch... > > > > On Fri, Jan 8, 2010 at 3:07 PM, mmjaeger <[email protected]> wrote: > > Hello > > I've some message text that I like to appear immediately and then > > disappear after e.g. 3.5 secs. > > > If I like to show another message while the effect is still running, I > > like to cancel the effect and start showing the new message. > > > The following code works somewhat but it still seems to chain up the > > messages to show - hope somebody can tell me what I'm missing: > > > showStatus: function(msg) { > > var el = document.id('statusID'); > > el.set('text', msg.toUpperCase()); > > > if (!$defined(this.fxStatus)) { > > this.fxStatus = new Fx.Tween(el, { > > 'property': 'opacity', > > duration: 700 > > }); > > } else { > > this.fxStatus.cancel(); > > this.fxStatus.set('opacity', 0); > > } > > > this.fxStatus.set('opacity', 1); > > this.fxStatus.start.pass([1,0], this.fxStatus).delay(3500); > > }, > > > Thanks
