Player object with audioClip

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
luvnpeas
Posts: 5
Joined: Tue Oct 19, 2010 6:16 pm

Player object with audioClip

Post by luvnpeas » Tue Nov 02, 2010 6:08 am

How can I make the source of a player object an audio clip rather than an external file? I don't want it linking to an external file that I have to include with the stack. I want all image and audio files included in the stack.

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

Re: Player object with audioClip

Post by Mark » Tue Nov 02, 2010 10:32 am

Hi luv,

Use Import as Control (in the File menu). Note that the number of formats that work as control is limited.

Best,

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

luvnpeas
Posts: 5
Joined: Tue Oct 19, 2010 6:16 pm

Re: Player object with audioClip

Post by luvnpeas » Tue Nov 02, 2010 5:08 pm

That won't work, because it is a midi. I can see how to play an audioClip with the play command, and how to play an externally referenced file in a player object. How do I play an audioClip (midi in Quicktime format) with a player object? Or otherwise play a Quicktime movie not as an externally referenced file, but as audio stored in the stack?

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

Re: Player object with audioClip

Post by Mark » Tue Nov 02, 2010 5:16 pm

luv,

I think you understand by now that what you want is impossible with RR/LC.

If you want to embed a sound file in your stack, you might save it in a custom property for distribution. When the stack opens on someone else's computer, write the file to the temp folder and use it from there.

Best,

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

Klaus
Posts: 14193
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Player object with audioClip

Post by Klaus » Tue Nov 02, 2010 5:17 pm

Hi,

you can't play any not referenced file in a player object!
Import the clip into the stack, write it back to disk when necessarry (specialfoderpath("temporary")) and the set the filename of a player.


Best

Klaus

Post Reply