Play a .wav file

Can Panorama 6 play a .wav file procedurally?

I found PlaySound but it argues “Can’t find sound within sound file.”

I think you need to have an application that can play the file. Not all .wav files are playable without a player with the proper codec.

You should go to the Finder, and click on the file, and see if it will play. If not, do a Get Info on it and see if there is a recommended application for playing it. Try that. If it works, set it as the application to open the file, and maybe it will work from Panorama. If not, PlaySound may not be the proper statement to open it.

If your .wav file is in a Super Flash Art Object you can play the file procedurally using the “Play” option as in superobject "MySound","Play". You would also have to make sure the sound is reset back to the beginning if it is to be run more than once. The Super Flash Art Object can be located off screen so it is never in view while running. Her is some simple sample code where MySound is the name of the Super Flash Art Object:

superobject "MySound","GoToBeginning"
superobject "MySound","Play"

Great. Thanks Gary.

For those that might be reading along…

(Don’t bother with ‘Flash Sound Object’ as I think that is needing a resource object from the past.)

Name your Flash Art SuperObject by clicking in the ‘status’ line on the right side at the bottom of the form window. (while in Graphics mode)

In the Flash Art SuperObject formula box, enter the name of the sound file in quotes. (If the sound file is in a different folder than your Panorama file, you will need to include the paths.)

Check the ‘Include Pictures on Disk’ box.

Do not be bothered by the visual duplicate or shadow of the Player Control as it seems to be just a visual distraction.