1 2 Previous Next 23 Replies Latest reply on Jul 28, 2016 9:35 AM by bhagara

    Play Sound from Container


      In over 20 years working with FileMaker, I do not recall ever testing this. I always assumed that one could script a sound stored in a container field to play, without the user having to click on play or interact with the field.


      To my surprise this does not seem to be possible. Here is what I have done to test this...

      • Create container field ( "not" stored externally )

      • Set field to Interactive Content

      • Field is editable in Browse

      • Used Insert Audio/Video to load a sound ( MP3 File )

      • Created a script to GoToField with the field specified and Select/Perform enabled, and created a button to run this script

      • Also created a button with just the script step directly being called.


      While I can play the sound if I click on the field and then press the play button on the media controller. I have not been able to get either of the above buttons to actually "PLAY" the audio. They do seem to select the field.


      I am not sure if this "ever" was possible in FileMaker, or if it was something that was removed (I know they stupidly removed the ability to record audio on the desktop on FM13.)


      I do not want to use a plugin, and I am trying to avoid doing a web viewer/base64 approach. I have looked through hundreds of threads and search results, and they all seem to state that what I have done "should" work.


      I have attached a simple file with the scenario included. On my MBP OS X 10.9.4 or my iPad Air with iOS 7 the buttons will NOT play the sound directly.


      Any thoughts would be appreciated,



        • 1. Re: Play Sound from Container

          In the Data Inspector check Start playback automatically—

          Screen Shot 2014-08-09 at 9.48.33 am.png

          • 2. Re: Play Sound from Container

            Thanks for the reply,


            Tried this already, this will play the file regardless of the buttons.  This is used to play the container when the record, layout, or object is entered.  This will not really accomplish what I am looking for in this case.



            • 3. Re: Play Sound from Container

              So what is the problem then? Without that set you can play the sound just by clicking the button, no script needed.

              • 4. Re: Play Sound from Container

                No... I can't, that is my problem... I do not want the sound to play unless called from the script.  On my end, I cannot get this to happen.  It will play on layout/record entry if the option is set (as you mentioned)... However I cannot get it to play otherwise (without clicking into the field and then selecting play).  In this case it is imperative that it plays "when requested by the script" there is a timer operation involved.


                I am also curious if this could be an Apple Sandboxing issue.

                • 5. Re: Play Sound from Container

                  It has always been my understanding (perhaps incorrectly) that the Select/Perform in the GoToField script step, would cause the audio/video in a container to start playing, Assuming the proper settings are in place.

                  • 6. Re: Play Sound from Container

                    If I go back to FM11, and do the same process using the Insert Quicktime into the field it will play back from the script step.  This is obviously something that was downgraded in FM13.

                    • 7. Re: Play Sound from Container
                      Stephen Huston

                      I tested an MP3 in an interactive container and got the same results you did.


                      I'll admit, I've never tried to trigger a sound from a script before (other than the Beep script step) so I had always assumed it did as you expected. Clicking inside the field to play the sound always made sense to me, or the onRecordLoad option, so I hadn't tumbled to this inconsistency before.

                      1 of 1 people found this helpful
                      • 8. Re: Play Sound from Container

                        Curious. FM Help reads, in part: "Select/perform tells FileMaker Pro to perform an action on the contents of a field. All text in a field is selected with this option. The contents of the field (sound or movie) determine what action is performed. If the field contains a sound, then the sound is played. If the field contains a movie, the movie is played."


                        Maybe it's a bug?

                        1 of 1 people found this helpful
                        • 9. Re: Play Sound from Container

                          I think it must be, as it works right in FM11.

                          • 10. Re: Play Sound from Container

                            I recall doing this back in the days of FileMaker 4.  I also seem to recall that at some point in the evolution of FM, it stopped working.  Based on what you are saying, v.11 -- > v.12 was probably that point.





                            • 11. Re: Play Sound from Container



                              I think I have a solution for you. I tested and, of course, got the same results. Then had a thought ... place the field in a tab with "Start Playback Automatically", then script go to object (tab). Worked as expected. Does that help?



                              • 12. Re: Play Sound from Container

                                Thanks Steve,


                                Already thought of that, "except" I was going to do it with a Popover, which does the same thing.  While both of these methods serve as work-arounds... it was, more of a curiosity about "why" the Select/Perform stopped working, as it "did work" in FM11.

                                • 13. Re: Play Sound from Container

                                  WSVP -


                                  This may be a known issue - still investigating it.


                                  In your solution, does it have to be an interactive container field?  I have had better results playing around with this if it isn't.  I was able to insert a MP3 / other file into a non-interactive container field and have it play when a script is run / button is pressed.  But enabling interactive does appear to mess things up.


                                  Steve Romig

                                  FileMaker, Inc.

                                  • 14. Re: Play Sound from Container

                                    Thanks Steve


                                    If I make it a non-interactive container, then use the "Insert QuickTime" to load the file, it will start playing from the Select/Perform... However when I tested this it seemed the only way to stop playback was with the escape key.  It seems to lock the whole system into a mode with FileMaker being the front window and no FileMaker interaction was possible without hitting the escape key, while FileMaker is the active application. Even the QuickTime controller was not selectable. Got slightly different behavior when executed from a button with a single script vs a button executing a script. the singe script step button would not play on one click, but would not cause the system lock.


                                    I think the Auto-Play in a Popover with interactive content approach may be the safest way at present.

                                    1 2 Previous Next