Search found 4 matches
- Sat Sep 10, 2011 3:18 pm
- Forum: General programming
- Topic: Event Handler with some keys
- Replies: 11
- Views: 15828
Re: Event Handler with some keys
Not sure, if this is what you want but try this: It is exactly what I was looking for. :) I don't know why on my Sam440 the CPU usage is 100%. I tried to modify your code and give more samples but I had to do something wrong because it still plays only one sample. Could you write me the code for tw...
- Fri Sep 09, 2011 2:25 pm
- Forum: General programming
- Topic: Event Handler with some keys
- Replies: 11
- Views: 15828
Re: Event Handler with some keys
If you don't want to use OnKeyUp you have to implement a flag so that only the first OnKeyDown event calls PlaySample(). That's pretty easy. I don't know how to implement a flag I'm beginner if you could give me a example I will be very grateful for your help. What happen after the implementation a...
- Mon Aug 22, 2011 1:14 am
- Forum: General programming
- Topic: Event Handler with some keys
- Replies: 11
- Views: 15828
Re: Event Handler with some keys
Try using "OnKeyUp" instead of "OnKeyDown". OnKeyDown will trigger multiple events while the key is down. OnKeyUp will trigger only once. I've tried with "OnKeyUp" but this is not a perfect solution for my program Harmonica (windows), Harmonica (AmigaOS4). And still th...
- Sat Aug 20, 2011 8:51 am
- Forum: General programming
- Topic: Event Handler with some keys
- Replies: 11
- Views: 15828
Re: Event Handler with some keys
Hello all, I have also a problem with the Event Handler @SAMPLE 1, "Sound/01.wav" @SAMPLE 2, "Sound/02.wav" Function p_SwitchButton(msg) If msg.action = "OnKeyDown" If (msg.key = "1") Or (msg.key = "2") If dointerval = True Then ClearInterval(1) doin...