views:

73

answers:

1

Hi, I'm trying to add a listener for the stop event in the word press audio player but usage seems to be undocumented. I'm hoping someone who knows a little flash can look at the code and tell me how it works:

In the code at http://tools.assembla.com/1pixelout/browser/audio-player/trunk/source/classes/Application.as I see the flash actionscript uses 2 methods to communicate with the browser javascript:

ExternalInterface.call("AudioPlayer.onStop", _options.playerID);
...
forward("STOP");

Edit: I've been able to have some success by adding a function to the AudioPlayer which gets called by the ExternalInterface.call():

onStop: function(playerID) {
    alert('stopped' + playerID);
}

However it looks like the proper notification procedure is to hook the forward() events by adding listeners. It seems the listeners don't get called - at least using my definition below:

AudioPlayer.addListener("player", "pause", function() { alert('paused'); });
A: 

I've also been unable to do this. Seems to be failing at the getPlayer() stage, although that function works fine everywhere else.

Did you ever get this to work?

Rick
Edited my question. I've been successful by defining an onStop function. However there is no onPause function called by the flash component so I still need to figure out the way to do it using listeners.
Jacob