[Proto-Scripty] Re: Help! Unable to defer function to run when interpreter is idle

2009-07-15 Thread Paul Kim
Hi TJ, thank you and Mike for your all your help! I simply thought about preventing the effect from firing and did not think about cancelling the current effect when a new event is being fired. This was very helpful! "But just not firing the effect doesn't seem like the right thing. What if the u

[Proto-Scripty] Re: Help! Unable to defer function to run when interpreter is idle

2009-07-15 Thread T.J. Crowder
Hi, Mike was indeed right in terms of the Function#defer. All that defer does is execute the function later. It doesn't prevent it from being executed more than once. If you want to prevent the effect from being fired a second time, you'll have to check for that condition. There are any numbe

[Proto-Scripty] Re: Help! Unable to defer function to run when interpreter is idle

2009-07-15 Thread Paul Kim
Hi Mike, I think you are most likely right because Firebug doesn't output any errors. However, defer() does not seem to be doing what I expected it to. When a user clicks the buttons very quickly, the fading images might either flicker or disappear. I didn't want to queue the fade/appear effects,

[Proto-Scripty] Re: Help! Unable to defer function to run when interpreter is idle

2009-07-15 Thread Mike Glen
Paul Kim wrote: > Basically, this is the error I get from firebug when I run > slideshow.showSlide(i).defer(): > slideshow.showSlide(i).defer() is undefined > > How can I defer the showSlide() function so that when users click on > the buttons too quickly, it will wait for the interpreter to idl