Solved

Ho to disable audio of the SWF file in Java Script (HTML)

Posted on 2010-09-17
10
5,146 Views
Last Modified: 2012-05-10
Hello All.
Could you suggest some solutions to disable audio of the .swf file using Javascript or HTML. I use <object> tag to show swf. Maybe should be some additional parameter?
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
                        width='80' height='80' align="middle">
                        <param name="allowScriptAccess" value="sameDomain" />
                        <param name="allowFullScreen" value="false" />
                        <param name="movie" value='some.swf' />
                        <param name="quality" value="high" />
                        <param name="scale" value="default" />
                        <param name="autoplay" value="false" />
                        <param name="volume" value="0" />
                        <param name="wmode" value="transparent" />
                        <param name="bgcolor" value="#ffffff" />
                        <embed src='some.swf' quality="high" bgcolor="#ffffff"
                            name="banner" align="middle" scale="default" wmode="transparent" allowscriptaccess="sameDomain"
                            allowfullscreen="false" autoplay="false" volume="0" width='80' height='80' type="application/x-shockwave-flash"
                            pluginspage="http://www.macromedia.com/go/getflashplayer" />
                    </object>

Open in new window

0
Comment
Question by:vusov
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 6

Expert Comment

by:Cesar Aracena
ID: 33702139
Try the param "mute" and set it to "true". Comment back to see if it works.
0
 
LVL 3

Author Comment

by:vusov
ID: 33702278
Caracena, thanks for replay. I tried this param and sound is not disabled.
0
 
LVL 6

Expert Comment

by:Cesar Aracena
ID: 33702309
Tried both in the object and embed tags? Hmm... that's strange. Try setting the autoplay to true and see what happens. If it does load without sound, then there's something causing not to load the volume values when the user starts the play on click.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:vusov
ID: 33702455
Nothing help, could you try my example http://sprava.dyndns.org/test.html
Thank you for your time
0
 
LVL 6

Expert Comment

by:Cesar Aracena
ID: 33703331
Hmm... I really thought it was a streamed movie but this is different. It seems like the SWF is treated like it was a gif. It is making a progressive download and I don't think you can play with it's sound properties. I think your best shot is to mute th SWF from Flash directly and if you want the user to start playing a sound, add a button for that in the movie.
0
 
LVL 6

Expert Comment

by:Cesar Aracena
ID: 33703334
You could also make the sound NOT start but play when the user passes it's mouse over or somthing like that... depends on what you want.
0
 
LVL 3

Author Comment

by:vusov
ID: 33707141
Thank you Caracena. As I understand I need to change the SWF file, but the file is uploaded by user and it's shown on my page. So I cannot change the file. I thought should be some settings of the Flash Player that controlled sound volume.  
0
 
LVL 6

Expert Comment

by:Cesar Aracena
ID: 33707785
Ok now I understand your predicament. I'll try and do some further research and if I find any way to work around your problem I'll tell you,.
0
 
LVL 6

Accepted Solution

by:
Cesar Aracena earned 500 total points
ID: 33707825
Look at http://www.boutell.com/newfaq/creating/mute.html

It seems that the problem are browsers as it should work with volume="0" as you originally stated. One option you have is to use a FLV player like JW Player where you can add a param for that and it will actually respect it, instead of using the browser's player, leaving margin for errors like this one.

Try setting up the player using JW Player's wizard at http://www.longtailvideo.com/support/jw-player-setup-wizard
0
 
LVL 3

Author Closing Comment

by:vusov
ID: 33788674
thanks
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question