Skip to main content

FlxButtonEvent

Kindclass
Packagemobile.flixel
Full namemobile.flixel.FlxButtonEvent
Sourcesource/mobile/flixel/FlxButton.hx
ImplementsIFlxDestroyable

Helper function for FlxButton which handles its events.

Public fields​

NameTypeStaticDefaultNotes
callbackVoid->Voidno—The callback function to call when this even fires.
soundFlxSoundno—#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.

ParameterTypeDefault
Callback (optional)Void->Void, ?sound:FlxSound—

View source

destroy​

inline function destroy():Void

Cleans up memory.

View source

fire​

inline function fire():Void

Fires this event (calls the callback and plays the sound)

View source