views:

181

answers:

5

I have a flash application written in action script 2, and at one point it makes multiple back-to-back JavaScript requests using getUrl().

They have to be done as separate requests because IE had a limit on the length of a single request, and fails silently if that limit is passed.

When ever this happens, if the user has their sound turned on there is a barrage of "click click click".

A: 

This has bugged me for ages as well. Nothing to do as far as I know :/

Happy to be corrected, though!

J

Zárate
That's my recollection as well.c.f. http://www.help2go.com/Tutorials/Web_Browsers/Turn_off_Internet_Explorer_clicking_sound.html [1]: http://www.help2go.com/Tutorials/Web_Browsers/Turn_off_Internet_Explorer_clicking_sound.htm
wombleton
A: 

You can change the "Start Navigation" Windows sound to "None". That will disable the clicking sound.

Larry Osterman
Downvote for Larry Osterman?! Oh, snap!
quixoto
OP wants to do it programmatically - using js/flash etc.
Amarghosh
You can disable the sound programatically - just clear the value of the start navigation registry key. But that's the only way of disabling the navigation sound in IE - the web browser control alway plays the Start Navigation sound.
Larry Osterman
+1  A: 

Found a related solution here: http://www.julienlecomte.net/blog/2007/11/30/ In summary, instead of this:

iframe.src = "...";

You do this:

var newIFrame = document.createElement("iframe");
newIFrame.src = "...";
iframe.parentNode.replaceChild(newIframe, iframe);

Would it be possible to load the external objects using DOM methods like this? Isn't there a flash to JavaScript bridge, so you could trigger some JS function from within your Flash script? It's kind of a kludge, but it might work.

Barnabas Kendall
A: 

I'm not familiar with the expression back-to-back call. Can you elaborate on what those calls are supposed to do?

If you mean that you're calling JS functions from AS and you have to use multiple getUrl calls because you want to communicate more information than IE can handle in one request (in which you are hiding your JS calls) then why don't you use ExternalInterface? If I'm not mistaken this feature was in AS2 and shouldn't produce any noise :-).

JavaScript:

<script language="JavaScript">
function alertUser(message) {
  alert(message);
  return true;
}
</script>

ActionScript:

import flash.external.ExternalInterface;

ExternalInterface.call("alertUser", "hello");

I'm assuming that the problem is in the amount of information you want to communicate to the JS. Otherwise you could just write JS wrapper function and call that using following:

getURL("javascript:myWrapper();");

And you would get only one click.

CodeRipper
+1  A: 

Forget about it, you can't fix stupid browser design. MS choose to annoy their users, that is their problem, not yours. If you fix it for them, you only take away their incentive to fix it where it ought to be fixed.

Users who get annoyed by this should find their way to the sound settings.

eBusiness