PDA

View Full Version : Help with JavaScript setTimeout.


Nevermore
02-15-2003, 07:26 PM
I have made a JavaScript piano, but am having a problem. The idea is that you can either play a peice with the mouse, or type in the numbers in the code box, and it will play the notes. However, it says their is an error in the script, and you can hear it - after the first note, the rest, instead of playing one by one, all play at the same time.
I have tried to use window.setTimeout to space the notes, but it doesn't seem to have worked. I am quite experienced with JavaScript, so am annoyed that I can't solve this problem. Please help - the page is at: http://www32.brinkster.com/jjscripts/musicstation1.htm.

Thanks in advance- there must be SOMEONE out there who can help me - I've tried everything!

Nevermore.

brothercake
02-16-2003, 04:37 AM
Er .. I tried to look at it, and it made IE6 crash ...

Nevermore
02-16-2003, 10:06 AM
I have got it working now, so thanks for your time.

whammy
02-16-2003, 04:12 PM
Still doesn't work for me... :(

In IE 6, it still plays one note, and then the rest of the notes all at once.

Opera produces the following error:

Error:
name: TypeError
message: Attempted to call non-function: has undefined value: 'play'

Mozilla produces the following error:

Error: document.embeds[note].play is not a function
Source File: http://www32.brinkster.com/jjscripts/musicstation1.htm
Line: 29

:eek: