Другие языки программирования и технологии
Нужна помощь по html.
Как сделать активный линк, чтобы при нажатие на него воспроизводилась музыка...?
это уже не html, а java script.
нашла вот такой код:
var aysound = new Array();
// Below: source for sound files to be preloaded
function soundLoad(position,sound){
aysound[position]=sound;
}
// DO NOT edit below this line. Following code is to load the audio file and play sound when mouse over and mouse out
document.write('<bgsound>')
IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
ver4 = IE¦¦NS? 1:0;
onload=auPreload;
function auPreload() {
if (!ver4) return;
if (NS) auEmb = new Layer(0,window);
else {
Str = "";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}
var Str = '';
for (i=0;i<aysound.length;i++)>+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whsound,play) {
if (IE) this.src = play? aysound[whsound]:'';
else eval("this.document.embeds[whsound]." + (play? "play()":"stop()"))
}
function playsound(whsound,sound,page)
{
soundToPlay="../audio/"+sound+".mp3";
soundLoad(whsound,soundToPlay);
if (window.auCon) auCon.control(whsound,true);
}
//stopsound event will be triggered to stop playing sound when the mouse moves out from a specific word. Also, the mouse move out event
//also triggers call mouseOver.php to keep mouse event into database
function stopsound(whsound,sound,page)
{
if (window.auCon) auCon.control(whsound,false);
}
вот здесь:
www.webmasterworld.com/forum49/475.htm
а также кое-что есть здесь:
www.pixel2life.com/forums/index.php?showtopic=44672
можно еще дать на поиск в гугле "sound on mouse move"
нашла вот такой код:
var aysound = new Array();
// Below: source for sound files to be preloaded
function soundLoad(position,sound){
aysound[position]=sound;
}
// DO NOT edit below this line. Following code is to load the audio file and play sound when mouse over and mouse out
document.write('<bgsound>')
IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
ver4 = IE¦¦NS? 1:0;
onload=auPreload;
function auPreload() {
if (!ver4) return;
if (NS) auEmb = new Layer(0,window);
else {
Str = "";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}
var Str = '';
for (i=0;i<aysound.length;i++)>+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whsound,play) {
if (IE) this.src = play? aysound[whsound]:'';
else eval("this.document.embeds[whsound]." + (play? "play()":"stop()"))
}
function playsound(whsound,sound,page)
{
soundToPlay="../audio/"+sound+".mp3";
soundLoad(whsound,soundToPlay);
if (window.auCon) auCon.control(whsound,true);
}
//stopsound event will be triggered to stop playing sound when the mouse moves out from a specific word. Also, the mouse move out event
//also triggers call mouseOver.php to keep mouse event into database
function stopsound(whsound,sound,page)
{
if (window.auCon) auCon.control(whsound,false);
}
вот здесь:
www.webmasterworld.com/forum49/475.htm
а также кое-что есть здесь:
www.pixel2life.com/forums/index.php?showtopic=44672
можно еще дать на поиск в гугле "sound on mouse move"
С помощью HTML этого не сделать, если ты поставишь линк на музыку, браузер предложит сохранить или вопроизвести.. .
Тут нужно флеш задействовать...
Тут нужно флеш задействовать...
нужно задействовать в этой задаче php или javascript.
Поищи в Yandex
Daniel Minasyan
Ты поищи, и когда найдешь - напиши как делать....
Похожие вопросы
- Нужна помощь в html-языке
- Нужна помощь по HTML коду!
- Нужна помощь с HTML
- Нужна помощь в html или javascripts
- Здравствуйте! Мне нужная помощь по HTML, конкретнее по `ах.
- Нужна помощь HTML!!!
- Php + html нужна помощь
- Знатоки HTML, нужна помощь! Думаю, вопрос не сложный для вас. Внутри.
- Управление сайтом HTML нужна помощь.
- Нужна помощь по информатике.
В принципе надо так же, как на "зайцев.нет". - нажать "прослушать" и воспроизводится музыка....что-то типо того :)