2014년 12월 6일 토요일

Need help with a textbox input into a timer for a sound to play. How?!

If you didn't understand the title, basically I made a textbox where you insert a number and that number then sets a timer interval for a clock.
What I did was create two clocks, one called Clock_Timer (for the timer to play the sound) and one called Clock_Repeat (for an infinite going commander thing) and made a textbox called 'Text_Seconds'
I also made sure that every time the Clock_Timer .Timer happens the sound is played.
I set the Clock_Repeat's timer interval to 1/1000 and then put these blocks:

when Clock_Repeat .Timer (<Control)
do | (Dark Green>) set Clock_Timer . TimerInterval to (Maths>) Text_Seconds.Text * 1000

What this does is whatever number I enter into the textbox, it should times it by 1000 and set it as the timer interval. So 1 second = 1000 in the timer interval.
However, for some reason, any number I enter that is above the number 2 won't work. The numbers 1 and 2 work perfectly and keep repeating, but it simply wont play any sound at all for any number after 2 seconds.

If you need any more information, don't hesitate to ask!
I really need this fixed as it's super important and I feel really stupid for not knowing how to do it.



Please post some screenshots of your blocks so we can see what you're doing...


댓글 없음:

댓글 쓰기