callbacks only work first time a player is used - workaround

Eric Peden eric at ericpeden.com
Thu Apr 1 04:44:07 EST 2004


I just filed a bug report for this, but thought I'd send it to the list
as well in case anyone else had run into the problem.

Callbacks set on a player are only called the first time the movie is
played. I ran into the problem earlier today, and identified a
workaround: setting the callbacks property allows callbacks to be sent
again. However, if the movie is replayed, they stop again, so the fix is
to reset them every chance you get:

  -- in the player's script
  on [playPaused, playStopped, or currentTimeChanged]
    set the callbacks of me to the callbacks of me
  end

You also have to perform this "reset" whenever you set the currentTime
of a player.

The problem was first described here:

  http://lists.runrev.com/pipermail/use-revolution/2003-July/018539.html

and the Bugzilla entry is:

  http://www.runrev.com/revolution/developers/bugdatabase/show_bug.cgi?id=1448

The poster linked to above was running OS X, but the problem has shown
up for us on Windows, too. Anyone else run into this? Any suggestions
for a more elegant way to reset the callbacks without intercepting a
bunch of messages?

-- 
eric


More information about the use-livecode mailing list