sound(key, volume, loop, connect) → {Phaser.Sound}
Creates a new Sound object.
Parameters
| Name | Type | Argument | Default | Description | 
|---|---|---|---|---|
key |  string | The Game.cache key of the sound that this object will use.  |  ||
volume |  number |  <optional> |  1 | The volume at which the sound will be played.  |  
loop |  boolean |  <optional> |  false | Whether or not the sound will loop.  |  
connect |  boolean |  <optional> |  true | Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.  |  
Returns
The newly created text object.
- Source code: gameobjects/GameObjectCreator.js (Line 147)
 
Please login to continue.