Page 1 of 1

Code not working as revlet

Posted: Tue Nov 24, 2009 10:47 pm
by tbalazs
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.

Re: Code not working as revlet

Posted: Wed Nov 25, 2009 7:41 am
by Janschenkel
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.

Re: Code not working as revlet

Posted: Wed Nov 25, 2009 10:42 am
by Mark
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

Re: Code not working as revlet

Posted: Wed Nov 25, 2009 11:46 am
by tbalazs
Thanks Jan and Mark. Other audio files work OK?
Tony.