Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

scripting MP3 to play

Featured Replies

Hi all

I have a looping script that allows the user to scan barcodes in batches. Based on certain criteria it's either successful or returns an error. It works great. I've now incorporated a "beep" upon an error return - works great. I've added a global container field off the layout and inserted an audio clip of a chime which I want to play when the result is successful. IT WILL NOT WORK.

The container is a global, data formatting is set to "interactive content" and "start playback automatically". Field entry set to "Browse Mode". Does not play. Script Debugger returns error 102 (field not found) so I moved the container onto the layout and the audio file plays upon entering browse mode and when I enter the layout, but the script does not trigger the clip to play. Even creating a stand alone script with one script function set to "Go to field - Select/Perform" doesn't trigger the clip to play. The global field is located in the table the layout is set to. I can manually trigger the file by clicking the Play icon within the container.

I have achieved this before in another file and I have ripped that file apart from the inside out trying to figure out what I have done differently. The ******* audio clip refuses to play!

Using FMP Advanced 13 on Mac OSX El Capitan. 

Maybe create a dedicated layout for just that container field and open the layout off screen? Ie, with coordinates -500, -500 or something and a window size of 100x100.

You can invoke that layout from a script, pause the script for the duration of the MPEG and close the window again.

Or perhaps hiding the field on layout enter and when you want to play the file you unhide it (using a global var) and refresh the field. Then after the duration of the audio hide the field again. Not sure if you can then unhide it and play it again though.

  • 3 weeks later...
  • Author

Thanks @OlgerDiekstra. I had to trigger a pause script for .01 seconds to allow the field to play. I'll give your method a shot!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.