help with loading audio clips into a stack

Jeanne A. E. DeVoto revolution at jaedworks.com
Fri Jul 15 01:47:13 EDT 2005


At 4:44 PM -0400 7/14/2005, Jon wrote:
>Ban and I finally managed to get a player he likes, but the way I 
>did it, the audio clips have to reside on the hard drive.  As you 
>can read below, Ban wants the audio data to be stored inside the 
>stack, so users can't clone it.
>
>The problem is that I don't know how to "suck" an audio clip into a 
>stack and then tell the player to play it back.
>
>Can anyone else help Ban?

Store it in a custom property:

   set the storedAudio of card "My Audio" to URL "binfile:myAudioFile.wav"

Then have a script in the Play button to spit it back out into a temp file:

   put the storedAudio of card "My Audio" into URL "binfile:myAudioFile.wav"

When finished playing (or when the application quits), delete the file:

   delete URL "binfile:myAudioFile.wav"
-- 
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com



More information about the use-livecode mailing list