This project is archived and is in readonly mode.

#750 ✓resolved

Swiff: Should not use $time to identify callbacks?

Reported by Michal | September 16th, 2009 @ 03:58 PM | in 2.0 (closed)

I'm having a problem in a page where several small flash applets are inserted in quick succession. Each one has a different callback (same function but with different bound arguments).

  • It seems that occasionally a callBack function is "lost" and overwritten by the next one

  • If I insert code that takes some time between loops (such as a console.log), then this issue does not occur.

  • Using MooTools 1.2.3 on Safari 4 on Mac. I've not managed to get Firefox to reproduce this.

My suspicion is that $time is returning the same value on consecutive calls. As $time is used in Swiff as (part of) the key of the callbacks object, this means that callbacks are overridden.

My suggestion is to use an integer variable, increment this by one for each Swiff instance, and use that to identify callbacks.

Apologies for the lack of test page with this: this is to do with a flash applet that I would prefer not to make public right now.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins



Referenced by