•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,637 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,157 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 982 | Replies: 0
![]() |
Hi,
I am trying to do with this code. . But i coudnt able to get it work.
It like i embed a background(bg) music in html and also wrote a javascript to stop playing the audio.
The script goes like this..
================================================== ====
In my flash, I created a button and in the button, i have this action script to call the javascript from the html.
When i tried the html, The audio is playing and when i click the button, the audio nver stops..
is there anywhere i have gone wrong?
Thanks for your help.
Regards,
Tryphy.
I am trying to do with this code. . But i coudnt able to get it work.
It like i embed a background(bg) music in html and also wrote a javascript to stop playing the audio.
The script goes like this..
html Syntax (Toggle Plain Text)
<script language="javascript"> function stopAudio() { document.audio.play(false); // I even tried puting the code stop() as below, yet doesnt work.. // document.audio.stop(); } </script> </head> <body> <embed name="audio" src="aa.mp3" loop="true" width="300" height="90" hidden="true" autostart="true"> </embed> <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="80" height="30"> <param name="movie" value="start.swf" /> <param name="quality" value="high" /> <embed src="start.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="80" height="30"></embed> </object> </body>
In my flash, I created a button and in the button, i have this action script to call the javascript from the html.
JavaScript Syntax (Toggle Plain Text)
on (press) { getURL("javascript:stopAudio()"); }
When i tried the html, The audio is playing and when i click the button, the audio nver stops..
is there anywhere i have gone wrong?
Thanks for your help.
Regards,
Tryphy.
Last edited by peter_budo : Jul 9th, 2008 at 11:13 am. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: change message on form
- Next Thread: AJAX created input field does not work in FireFox


Linear Mode