Need to play sound instead of displaying popup window

1
Instead of displaying a client popup message, I would like to play a sound to alert the user. I have attempted to do this using a java action call, but have not been successful. I am looking into using javascript (maybe via the html snippet widget), but am having trouble tying it to an event (based upon the value of a boolean attribute). Any suggestions?
asked
2 answers
1

I've started an implementation of a SoundPlayer widget here.

The concept behind the widget is that you place it inside the context of a FileDocument containing a sound file, and it plays the sound upon showing the widget.

It is definitely a proof-of-concept at this point, but it does work! I certainly invite others to contribute.

Right now, the sounds play too often (upon show and hide, every time the widget rendering is updated), and I think it’s creating a new sound manager object each time that happens. Also, the widget parameters need to be cleaned up, and some boilerplate widget code needs to be ripped out.

answered
1

Perhaps the following snippet can help in your search?

<embed type="application/x-shockwave-flash" flashvars="audioUrl=notification.mp3&autoPlay=true" src="audio-player.swf" width="400" height="27" quality="best"></embed>

Do keep in mind that this was once implemented in a Mx3 project, using a HTMLSnippet that was added to a TemplateGrid. For that specific situation, a notification entity existed, to which users could be linked. As soon as a new notification was added, I believe a microflow timer triggered a refresh of the page/templategrid, resulting in the HTMLSnippet being triggered.

Note that I have not tested the above functionality in Mx5, but the concept could still be applicable, though I admit it would require more work than simply having a microflow trigger a 'play sound event' action.

answered