Page 1 of 1

[11 Jun 2010] Sample interrupting

Posted: Sat Jun 13, 2020 5:32 pm
by matthias
Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 11 Jun 2010 22:10:50 -0000

Hi, in Designer i added a Sample to a button. The sample plays fine when i press the button until end of sample. That's my problem. I like when i press the button sencond time that the sample stop immediately and start playing from beginning. How i have to code in Hollywood? Thanks Matthias

[12 Jun 2010] Re: Sample interrupting

Posted: Sat Jun 13, 2020 5:32 pm
by Bugala
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 12 Jun 2010 02:31:38 +0300 (EEST)

Without actually looking for the right commands (you have to check them for yourself from manual), i would say its about this way:

Click on that button, then choose "On Click" - option. Then in there choose the "Custom Code" option.

to there you write:

Code: Select all

temp = samplestillplaying(1)

if temp = TRUE then StopSample(1)
if temp = FALSE then PlaySample(1)

[12 Jun 2010] Re: Sample interrupting

Posted: Sat Jun 13, 2020 5:32 pm
by matthias
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 12 Jun 2010 08:09:55 -0000

Thanks i'll try it :-)