Livecode 7.0 rc 2 path name issue

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7257
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Livecode 7.0 rc 2 path name issue

Post by jacque » Thu Nov 27, 2014 12:09 am

The explanation helps. If you are very sure that the defaultFolder is the one containing the app (and therefore the subfolder) then you don't need to go up a level ("../") and then back down again to the default folder. Just check if there is a folder with the name you need, and a file inside that. Also, unless you will need to reference it later, it's faster to omit the field storage and just use a variable. But a field won't hurt.

Code: Select all

set the itemDelimiter to "/"
answer file "Pick a file:"
if it = "" then exit to top
put "FLAn_Audio/" & last item of it into thefiletoPlay
if there is no file thefiletoPlay then -- check existence
  answer "No file found."
  exit to top
else
  set the filename of player "jokeaudio" to tPath
end if
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Multimedia”