We have make some buttons in index.html , but we want to add sounds when click the button. We are very fresh for coding, we don?t know how to add the onclick sound effect in the js file or index.html . Please give us some solution or advice. Thank you so much.
over 4 years ago
Hi, form your snippet it seems that you're using the PhoneGap sample application. In there, you want to play a sound effect when you open a sample? If so, then you would have to use some js library which is capable of playing sound files. Inside the ARchitect World, you can use AR.Sound to playback sound files.
Since you mentioned that you're new to js, please keep in mind that the PhoneGap html/js is not connected to the ARchitect World. You can communicate between these two different contexts, but can not directly use a compnent from one context in the other. For example, you can not use the AR.Sound to playback sound files in your PhoneGap part of the application.