Happy, Happy 5th of December: by sheer chance I stumbled on how to do this . . .

In fact the whole thing is dead easy (not, admittedly clear from the Dictionary).

http://forums.livecode.com/viewtopic.php?f=7&t=30258&p=161069#p161069

Best, Richmond.

On 5/12/17 12:47 am, Graham Samuel via use-livecode wrote:
Hi - perhaps due to not picking the right search terms in the documentation, I 
am confused about playing audio files in LC 8. What I want seems quite simple 
to me: I want the user to click a button which will cause a single MP3 file to 
play. While it plays I may or may not want to switch cards or use visual 
effects. When it stops, I want to take back control and move the program onto 
something else.

It appears that I have to use a player object to play MP3s, since the “play” 
comment will only play aiffs. OK, so I can create a player object, but I want 
to embed my MP3 file into it (since I have no need to play more than one file), 
I want to start it, and I want the option to do stuff while it’s playing, and I 
certainly want to do stuff when it stops.

The documentation is not good on this - there is no indication as to whether 
you can embed files (if you can’t, what would the path to a file included in 
the program look like - I can only see paths referring to files in my 
development environment)? There is one reference in Beginner’s Guide to a “play 
stopped” message, but there isn’t one in the User Guide. My old friend “wait 
until the sound is done” seems to have died of old age. How do I know when the 
sound is finished, or alternatively how can I know if it’s still playing?

Can anyone explain what I’m supposed to do, or (just as good) point me to the 
right bit of LC documentation?

TIA

Graham
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to