facebook

Buttons and images playing sounds when clicked?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #348398 Reply

    MrNick
    Member

    Is it possible to have buttons, navigation menus, and/or images play a sound when clicked? How? I am trying to give my apps more of a game feel. Specifically, I am trying to get the app to give audio feedback to an autistic child when he presses, say, a picture of a banana. Thank you!

    #348400

    Code_A
    Member

    Yes, this is possible. Here is how you do it:

    1. Place an audio widget and a button on the screen (link the audio file to the audio widget and make sure you add the audio file to your project’s additional files).
    2. In the Run Javascript box of the button OnClick action, place the following code (example):

    var aw1 = AudioPlayerWidget.fromWidget('m1-<screen>-audio1-container'); 
    aw1.play();

    For more info, reference the Audio Widget API documentation.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Buttons and images playing sounds when clicked?

You must be logged in to post in the forum log in