FlxButtonEvent
| Kind | class |
| Package | mobile.flixel |
| Full name | mobile.flixel.FlxButtonEvent |
| Source | source/mobile/flixel/FlxButton.hx |
| Implements | IFlxDestroyable |
Helper function for FlxButton which handles its events.
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
callback | Void->Void | no | — | The callback function to call when this even fires. |
sound | FlxSound | no | — | #if FLX_SOUND_SYSTEM · The sound to play when this event fires. |
Public methods
new (constructor)
function new(?Callback:Void->Void, ?sound:FlxSound):Void
@param Callback The callback function to call when this even fires. @param sound The sound to play when this event fires.
| Parameter | Type | Default |
|---|---|---|
Callback (optional) | Void->Void, ?sound:FlxSound | — |
destroy
inline function destroy():Void
Cleans up memory.
fire
inline function fire():Void
Fires this event (calls the callback and plays the sound)