Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Events
Phaser 4.1.0
Phaser 4 examples
Events
9
examples
Examples
9
Create Event Emitter
This example demonstrates how to create a standalone instance of the Phaser Event Emitter, register a custom event listener, and emit events with arguments.
Emit Events Using Symbols
This example demonstrates how to use ES6 Symbols as unique event identifiers when registering and emitting events within the Scene Event Emitter.
Emit Scene Event
This example shows how to use a Scene's internal EventEmitter to listen for and dispatch custom events within a Scene.
Event Arguments
Learn how to pass and receive multiple parameters when emitting custom events in Phaser.
Game Object Events
Demonstrates how Game Objects can emit and listen for custom events to trigger actions, such as changing visual properties.
Listen to Game Object Custom Events
Demonstrates how to bridge standard scene input events to custom events emitted directly by Game Objects, allowing objects to handle their own logic through event listeners.
Once Event Listener
Demonstrates how to register an event listener that automatically removes itself after being triggered a single time.
Turn Off Anonymous Event Handler
This example demonstrates how to remove all listeners for a specific event by calling the off method without a callback reference, which is particularly useful for stopping anonymous functions.
Turn Off Event Handler
Demonstrates how to programmatically remove an active event listener using the off method after a specific condition is met.