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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

thingworx studio bgm or effect sound

송동현
1-Newbie

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

Top Tags