Flash Challenge.getMyIndex()
From J2Play
Contents |
Description
Gets the index of the current player in the players array
Syntax
public function getMyIndex() : Number;
Parameters
N/A
Return Value
@return index number
Examples
You can use this index to judge whether this player is challenger or challenge receiver.
if (challenge.getMyIndex()==0)
{
var information: String = 'Challenging: " + challenge.getNickname(1);
}
else
{
var information: String = 'Challenge from: " + challenge.getNickname(0);
}
