FGGE  v0.7
Fabiogiopla HTML5 Game Engine
 All Classes Namespaces Functions Variables Pages
Public Member Functions | List of all members
GameEngine.Media.Audio Class Reference

Audio object. More...

Public Member Functions

 Audio (var path)
 Create an Audio from path.
 
 play ()
 Start reproducing.
 
 pause ()
 Suspend reproduction.
 
 stop ()
 Stop reproducing.
 

Detailed Description

Audio object.

This can be a music or sound effect.
This is similar to HTML5 audio, but load-managed.

Constructor & Destructor Documentation

GameEngine.Media.Audio.Audio ( var  path)

Create an Audio from path.

Create a new Audio, path is the url of an audio file or the audio in base64 notation.

var explosion = new GameEngine.Media.Audio("explosion.ogg");
Parameters
pathThe path or base64 notation of an audio file.

Member Function Documentation

GameEngine.Media.Audio.pause ( )

Suspend reproduction.

Stop reproducind the Audio without rewinding.

GameEngine.Media.Audio.play ( )

Start reproducing.

Start reproducing the Audio.

GameEngine.Media.Audio.stop ( )

Stop reproducing.

Stop reproducing the Audio and rewind.