I wonder how you approach the following issue:

I have a bunch of thumbnails that are turned into an "thumbnail grid"
by a small class. It grabs the container, stores all thumbs in a list,
attaches events like a click that checks if the clicked on thumb is
another one than the one set as current. If yes, it fires an event...
can't get any easier.
(Similar like Arieh's earlier post here:
http://groups.google.com/group/mootools-users/browse_thread/thread/99be5cd0c6a5ebec)

I've extended that class to add functionality so it works with Ryan
Florence's SlideShow. The extended class also creates the basic stuff
needed for SlideShow (a slide for each thumb) and does a little more.
Now when you click a thumb, it tells me the slide is ready or not &
waiting to be moved. Basically you have a gallery now. Can't get any
easier.

The app picks up the fired event and starts with a queue of actions,
basically a chain of fx, including a call to the SlideShow to slide in
the clicked image.

The goal is to prevent thumb clicks (actions starting after the click)
when the chain of fx is still running. When the slide is moving and
other animation is still running I can keep clicking the thumbs which
register as fresh clicks, since the thumbnail class attached a click
event and the chain of fx run independant of this.

My current "solution" is also a cheap one: I place a div above the
thumbnail grid with a transparent background so you can't click the
thumbs below. When the chain is done I remove it and you can click the
thumbs again. So even though this works, it doesn't feel like a proper
solution.

OK- before I broke it up in parts, I butchered this together
(deadlines!) in a big singleton class and I used a this._busy variable
(set to true or false) and I could easily see in the thumbnail click
event if my app was busy and return/do nothing if this was the
case...

Your toughts are appreciated!

Rolf

Reply via email to