Skip to content
Advertisement

Tag: playsound

Playing soundfile when hovering over specific object

Can anyone understand what I’m doing wrong? This code returns the error that “songs is not a function”. Regards, Shape of Mustard Answer The problem was how you access to your object https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object Object properties must be accessed in the following ways songs.song1, or songs[‘song1’], the latter is useful in cases where the first character of the property is a

Advertisement