This works fine when complied for OS X and run locally:
on mouseUp
play audioclip "fanfare10.wav"
repeat with i = 1 to 5
set the blendlevel of me to 100
wait 0.2 seconds with messages
set the blendlevel of me to 0
wait 0.2 seconds with messages
end repeat
end mouseUp
When compiled as a revlet, the audio clip does NOT play although the blendlevel repeat works.
In both cases, the code is run on a local machine and the audio file is in the same directory as the executable. What is going wrong?
Thanks, Tony.
Code not working as revlet
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
Re: Code not working as revlet
Your revlet may not have the necessary permissions to read files on the hard disk. Also, your revlet is not a standalone application, but is actually run inside a 'helper' app (the revWebPlugin) and as such, you can't count on the defaultDirectory pointing to the directory where your revlet is (in fact, if you check the effective filename of this stack from a revlet, it will be empty, as it only exists in memory.
Jan Schenkel.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Re: Code not working as revlet
Hi,
About half of the wav files I have been using with Rev for years now, don't work in a revlet. Seems a bug to me.
Best,
Mark
About half of the wav files I have been using with Rev for years now, don't work in a revlet. Seems a bug to me.
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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Code not working as revlet
Thanks Jan and Mark. Other audio files work OK?
Tony.
Tony.