How do I access the macOS "puff of smoke" sound?

I’m working on a canvas on which the user can drag tiles back and forth (think dragreorderrow on listbox, but horizontally) and I’d like as well to allow the user to drag a tile out of the canvas and have it go “poof” as I delete it from the array.

The visual would be nice, but I think macOs no longer uses it, but how do I access the sound?

MBS plugins are fine to cite - but I can’t find it there…(tried, but not certain where to look)

/System/Library/Components/CoreAudio.component/Contents/SharedSupport/dock/“poof item off dock.aif”

took 1 minute with Google to find this

So, there is nothing comparable to System.Cursors? or special folders?

No, if there were the Xojo docs would have mentioned it I’m sure

That’s why I specifically noted that plug-in options are fine by me if they answer this question.

Sounds are files, the are not methods, functions or declares… So any “plug-in” will reference that exact same file either directly or indirectly… but if you wish to complicate things, you are free to do so.

So, how do Apps in the Store do it?
I am sure they won‘t acces the Sound directly via the Path. :wink:

Copy the sound file into your app’s resources directory, just like you would with a picture. That’s what I do.

There is no api for that sound.
But here s some sample code:

dim p as string = "/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/dock/poof item off dock.aif" dim f as FolderItem = GetFolderItem(p, folderitem.PathTypeNative) dim s as sound = f.OpenAsSound s.play