For everyone interested, here's my simple implementation.
Javascript Code
//keep a reference to every player in the page
players = [];
//called by every player
function register(id)
{
players.push(id);
}
//stop every player except the one sending the call
function stopOthers(from_id)
{
for(var i = 0; i < players.length; i++)
{
var id = players[i];
if(id != from_id)
{
//setEnabled is a callback defined in AS3
thisMovie(id).setEnabled(false);
}
}
}
//utility function to retreive the right player
function thisMovie(movieName)
{
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
} else {
return document[movieName];
}
}
AS3 Code
if(ExternalInterface.available)
{
ExternalInterface.addCallback("setEnabled", setEnabled);
ExternalInterface.call("register", ExternalInterface.objectID);
}
function setEnabled(value:Boolean):void
{
//do something
}
//when I want to stop other players
if(ExternalInterface.available)
ExternalInterface.call("stopOthers", ExternalInterface.objectID);