Player FileName from Loaded URL
Signe Marie Sanne
signe.sanne at roman.uib.no
Tue Feb 3 06:27:42 EST 2004
At 22:12 02.02.2004 -0800, you wrote:
>[I asked a question similar to the following in the past without a
>definitive answer so I thought I'd try again to see if there's any new
>insight :-) ]
>
>Is it possible to set the fileName of a player to a loaded URL?
>
>I have script which loads the URL of an audio file into the local cache.
>But if I try to set the fileName of a player to the loaded URL, the result
>reads "could not open movie file". This technique works with stacks but
>apparently not with other file types. Is it even possible to access the
>local cache directly when the loaded file is something other than a stack?
>
>I know I could write out the audio file to the drive, but I'd like to avoid
>cluttering the user's drive with downloaded files.
I use this technique after downloading the audio file:
put urlStatus(tUrl) into stat
if stat contains "cached" then
put url tUrl into var
put "binfile:" & the directory & "/sfp.wav" into filnavn
put decompress(var) into url filnavn --Generates a audio file with the
name "sfp.wav"
put the directory & "/sfp.wav" into lydfil
play lydfil
unload url tUrl
delete file lydfil --Deletes the local audio file
exit updateme
end if
Regards
Signe Marie Sanne
1. amanuensis Signe Marie Sanne e-mail: signe.sanne at roman.uib.no
Romansk Institutt tel: +47 55 58 21 27
Øisteins gt. 1
5007 Bergen http://www.hf.uib.no/hfolk/mlab/hjem/default.html
Norway
More information about the use-livecode
mailing list