Javascript Audio

I know some of the javascript codes for adding sound, but my question is, how do I convert my audio to fit the code?


Umm... JavaScript is for user interactivity (buttons, textboxes, menus). Are you thinking of HTML? Or is it one of those weird JS-HTML blends that pops up occasionally?

Can you paste the code into a reply? That would be great.



[Click for music]:
    ogg = new Audio();
    ogg.src = "Insert sound here";
    ogg.load();
    ogg.play();
    ogg.loop = true;
    set ("ogg",ogg);

That's one of the few codes i know for sound, I'm a little stuck on how you convert and add your own audio file. I think its a JS-HTML blend but I'm not sure, as i am still a newbie.


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums