I'm not clear about what you're asking.

Callbacks, or events, are simply functions that you can call when stuff happens.

Can you ask a specific question?  Your demo looks like you get the gist of it.

On Jun 25, 2010, at 11:34 AM, jiggliemon wrote:

> I'm having a hard time wrapping my head around the practice of
> Callbacks. Arron rewrote one of my examples using callbacks, and no
> matter how much I search for a good description of "How and Why" to
> use them, I'm always left empty.  So why not take it to the smartest
> people in Javascript?
> 
> I wrote a little fiddle of two functions that I would like to chain,
> But due to the asynchronous nature of "Ajax", my second function is
> fired before prior to the first Function's completion.
> 
> I realize in the current example. I could simply attache function 2 to
> the Asset.images's #onComplete method, but that's going to defeat the
> purpose of my little exercise - using callbacks.
> 
> Any help in executing a simple "Callback"  method, would be awesome.
> 
> Thanks dudes!
> 
> http://jsfiddle.net/mvmvp/

Reply via email to