cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

thingworx studio bgm or effect sound

송동현
2-Explorer

thingworx studio bgm or effect sound

I want to sound every time I touch every button.


BGM sound
Effect Sound

How's that without using a widget?

Is there a way to script it?

iam newbie, thank you for your help.

1 REPLY 1

Hi--

 

To play sound, you'll need to add an audio widget to your 2D layout and add the sound file to your resources. Then turn off the "Visible" and "Show controls" options for the audio control.

 

Now for each control (e.g. Button) you want to trigger the sound, bind the control's Click event to the audio control's "Play" service.

 

If you need to play the sound via script, you can use something like this:

 

$scope.app.fn.triggerWidgetService('audio-1','play');

 

--Clay

Announcements

Top Tags