AvatarEvent

Kind of class:public class
Package:com.smartfoxserver.openspace.engine.control.events
Inherits from:BaseEvent < Event
Dispatched by:
Author:The gotoAndPlay() Team
http://www.openspace-engine.com
http://www.smartfoxserver.com
http://www.gotoandplay.it
Classpath:com.smartfoxserver.openspace.engine.control.events.AvatarEvent
File last modified:Sunday, 18 April 2010, 12:29:39
AvatarEvent is the common class for the avatar-related events dispatched by OpenSpace.

This class provides a public params property (inherited from the BaseEvent.params property) that can contain a variable number of parameters, depending on the event type.
Usage:
  • Add a listener for this event to the main OpenSpace instance using the OpenSpace.addEventListener method.

Summary


Constants
  • AVATAR_CREATED : String
    • Dispatched when an avatar is created.
  • START_MOVEMENT : String
    • Dispatched when an avatar standing on a tile starts moving.
  • STOP_MOVEMENT : String
    • Dispatched when a moving avatar stops on a tile.
  • ENTER_TILE : String
    • Dispatched when an avatar enters a tile during its movement.
  • LEAVE_TILE : String
    • Dispatched when an avatar leaves a tile during its movement.
  • CLICK : String
    • Dispatched when an avatar (main sprite only) is clicked.
  • ROLL_OVER : String
    • Dispatched when the mouse rolls over an avatar (main sprite only).
  • ROLL_OUT : String
    • Dispatched when the mouse rolls out of an avatar (main sprite only).
Instance properties
Instance properties inherited from BaseEvent
Instance methods
Instance methods inherited from BaseEvent

Constants

AVATAR_CREATED

public static const AVATAR_CREATED:String = "avatarCreated"
(read)

Dispatched when an avatar is created.

The BaseEvent.params object contains the following parameters.
Parameters:
id:
(int) the avatar's identifier, corresponding to the SmartFoxServer id of the avatar's owner.

CLICK

public static const CLICK:String = "avClick"
(read)

Dispatched when an avatar (main sprite only) is clicked.
This event is fired if the <EnableAvatarMouseEvents> parameter in the OpenSpace client-side configuration is set to 1 only.

The params object contains the following parameters.
Parameters:
id:
(int) the avatar's identifier, corresponding to the SmartFoxServer id of the avatar's owner.

ENTER_TILE

public static const ENTER_TILE:String = "enterTile"
(read)

Dispatched when an avatar enters a tile during its movement.
This event is fired if a trigger of type TriggerType.AVATAR_ENTER has been assigned to the tile entered by the avatar. Check the Trigger class description for more informations.

The params object contains the same parameters of the START_MOVEMENT event.
See also:

LEAVE_TILE

public static const LEAVE_TILE:String = "leaveTile"
(read)

Dispatched when an avatar leaves a tile during its movement.
This event is fired if a trigger of type TriggerType.AVATAR_LEAVE has been assigned to the tile left by the avatar. Check the Trigger class description for more informations.

The params object contains the same parameters of the START_MOVEMENT event.
See also:

ROLL_OUT

public static const ROLL_OUT:String = "avRollOut"
(read)

Dispatched when the mouse rolls out of an avatar (main sprite only).
This event is fired if the <EnableAvatarMouseEvents> parameter in the OpenSpace client-side configuration is set to 1 only.

The params object contains the following parameters.
Parameters:
id:
(int) the avatar's identifier, corresponding to the SmartFoxServer id of the avatar's owner.

ROLL_OVER

public static const ROLL_OVER:String = "avRollOver"
(read)

Dispatched when the mouse rolls over an avatar (main sprite only).
This event is fired if the <EnableAvatarMouseEvents> parameter in the OpenSpace client-side configuration is set to 1 only.

The params object contains the following parameters.
Parameters:
id:
(int) the avatar's identifier, corresponding to the SmartFoxServer id of the avatar's owner.

START_MOVEMENT

public static const START_MOVEMENT:String = "startMove"
(read)

Dispatched when an avatar standing on a tile starts moving.
This event is fired if a trigger of type TriggerType.AVATAR_MOVE has been assigned to the tile on which the avatar is standing. Check the Trigger class description for more informations.

The params object contains the following parameters.
Parameters:
id :
(int) the avatar's identifier, corresponding to the SmartFoxServer id of the avatar's owner.
tile :
(Tile) the Tile object corresponding to the tile on which the avatar is currently located.
trigger:
(Trigger) the Trigger object associated with the tile.
See also:

STOP_MOVEMENT

public static const STOP_MOVEMENT:String = "stopMove"
(read)

Dispatched when a moving avatar stops on a tile.
This event is fired if a trigger of type TriggerType.AVATAR_STOP has been assigned to the tile on which the avatar stops. Check the Trigger class description for more informations.

The params object contains the same parameters of the START_MOVEMENT event.
See also: