Code not working as revlet

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tbalazs
Posts: 9
Joined: Tue Sep 22, 2009 10:21 pm

Code not working as revlet

Post by tbalazs » Tue Nov 24, 2009 10:47 pm

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.

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Re: Code not working as revlet

Post by Janschenkel » Wed Nov 25, 2009 7:41 am

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.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Code not working as revlet

Post by Mark » Wed Nov 25, 2009 10:42 am

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
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

tbalazs
Posts: 9
Joined: Tue Sep 22, 2009 10:21 pm

Re: Code not working as revlet

Post by tbalazs » Wed Nov 25, 2009 11:46 am

Thanks Jan and Mark. Other audio files work OK?
Tony.

Post Reply