Flash Challenge.setDisplayMessage()

From J2Play

Jump to: navigation, search

Contents

Description

Set the information message string sent to this player, which will be shown on challenge system as notification to the player.

Syntax

public function setDisplayMessage(index: Number, message: String) : Void;

Parameters

* @param index of player
* @param message the message string you want to set

Return Value

N/A

Examples

When a two player challenge finish, you should set all the information as result notification to all players. For example, current player win this challenge with score 5000.

  var index=challenge.getMyIndex();
  challenge.setDisplayMessage(index,'You won this challenge by score 5000');
  challenge.setDisplayMessage(1-index,'You lost the challenge, opponent get score 5000');
Personal tools