Play random audio on a button click

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bluesbroBUSUvh3
Posts: 1
Joined: Sun Jul 01, 2012 4:28 pm

Play random audio on a button click

Post by bluesbroBUSUvh3 » Thu Jul 05, 2012 3:42 pm

Hello,

I am in search of a way to link a bunch of audio files to a button so when a user clicks the button the mobile device randomly selects a wav file to play from a sound folder where the wav files are stored.

I have been searching the forums for this and have not found anything about it yet but if I have missed it please point me into the right direction.

Thank you very much for your help.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Play random audio on a button click

Post by Mark » Fri Jul 06, 2012 8:59 am

Hi,

Put your files in a list and "put any line of myList into myFile". Now you can play that file.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply