Skip to main content

mobage.shellapp.SoundEffect


Methods​

mobage.shellapp.SoundEffect.play​

void play(String fileName)

This function controls sound effects (SE).

  • Android devices only support .ogg file format. iOS devices only support .m4a (AAC) file format.

  • Sound effects will play as one-shot only, even if another application is playing sound in the background.

Parameters

Name

Type

Description

fileName

String

String indicating filename of sound effect to be played
No sound effect is played if a non-existent filename is specified.

Return value
None

Sample

mobage.shellapp.SoundEffect.play("se_sample.ogg"); // for Android
mobage.shellapp.SoundEffect.play("se_sample.m4a"); // for iOS
mobage.shellapp.SoundEffect.play("se_sample"); // without extension

Revision History​

  • 03/14/2014
    • Fixed sample codes.
  • 03/01/2013
    • Added support for iOS.
  • 12/11/2012
    • Initial release.