Portable Script for playing external mp3 file?

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
thomthib
Posts: 17
Joined: Wed Mar 05, 2014 1:09 am

Portable Script for playing external mp3 file?

Post by thomthib » Fri May 29, 2015 8:00 pm

Can anyone give me a script for a stack that uses the player object to play an external audio file? The trick is, the stack has to be portable so that I can move it to another computer and the player will still work, in other words, the player will still 'see' the mp3 file no matter which computer it's on.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Portable Script for playing external mp3 file?

Post by LCNeil » Thu Jun 04, 2015 2:18 pm

Hi thomthib,

If I understand correctly, what you will need to do is use the "Copy Files" section of your standalone application settings to copy any audio files that you wish to have included with your standalone.

As these will now be included with your standalone, you will be able to reference them via script.

From a standalone, you can then work with defaultFolder property to generate the URL to your audio files.

I hope this gives you some leads.

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-

thomthib
Posts: 17
Joined: Wed Mar 05, 2014 1:09 am

Re: Portable Script for playing external mp3 file?

Post by thomthib » Thu Jun 11, 2015 6:59 pm

Thank you for your response, Neil. I can’t include the audio files in the standalone. My program is a text processor that allows foreign language teachers to create hypermedia texts by linking information to specific words. Then when students click on the words, a translation will appear as well as other relevant info. Teachers can also link an external audio or video file and use the transcript as the reading material. When I link the external file to the player object, everything works fine. When I move the entire project to a different computer, everything works fine except for the player. The player appears but when you click on the PLAY button, nothing happens. It seems the player can’t see the external file anymore. I’ve only tried this on Macintosh. This was not a problem for years. It only became a problem when I started using LC 7. A demo of my editor is here: https://www.youtube.com/watch?v=WVozjsL1DX0

I greatly appreciate any suggestion you might have.

Post Reply

Return to “Multimedia”