Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

How to send an event to a specific player please?

2 replies [Last post]

Hey!
I will like to know how do I send an event to a specific player please?

I got 2 players on the same page.
(id: player1, player2)

OK after trying so much with no clue of what I'm doing,
I got it!

<script type="text/javascript">
var player   =  null;
var playerz;

function stopPlayer(player)
{
playerz = player;
playerz.sendEvent('STOP');
};
</script>

and then call it like this:

<a href="#" onclick="stopPlayer(player1);">STOP PLAYER 1</a>
<br />
<a href="#" onclick="stopPlayer(player2);">STOP PLAYER 2</a>