Skip to content
ClassAudio System@public

FlxSoundGroup

A hierarchical volume and mute bus for link instances.

ts
export declare class FlxSoundGroup

Constructors

ts
constructor(name: string, parent?: FlxSoundGroup | null)

Constructs a new instance of the FlxSoundGroup class

ParameterTypeDescription
namestring-
parentFlxSoundGroup | null-

Properties

PropertyModifiersTypeDescription
actualVolumereadonlynumberVolume after applying every ancestor bus.
mute-boolean-
mutedreadonlybooleanWhether this bus or any ancestor bus is muted.
namereadonlystring-
parentreadonlyFlxSoundGroup | null-
soundCountreadonlynumber-
volume-number-

Methods

add()

ts
add(sound: FlxSound): FlxSound

Route a sound through this bus, removing it from its previous bus.

Parameters:

ParameterTypeDescription
soundFlxSound-

Returns: FlxSound

createChild()

ts
createChild(name: string): FlxSoundGroup

Create a child bus whose effective settings include this bus.

Parameters:

ParameterTypeDescription
namestring-

Returns: FlxSoundGroup

destroy()

ts
destroy(): void

Detach sounds and recursively destroy child buses.

Returns: void

remove()

ts
remove(sound: FlxSound): FlxSound

Stop routing a sound through this bus.

Parameters:

ParameterTypeDescription
soundFlxSound-

Returns: FlxSound

Released under the MIT License.