Prevent scrolling in IE with focus focus

I have a web page where users can play flash games. Now we are making some changes to a page that requires games to be embedded in wmode=transparentor wmode=opaqueso that we can display HTML elements on top of flash games. The problem is that in Internet Explorer (on all versions) the entire page scrolls if the user presses the up / down arrow keys. I tried everything I could think of, and all day I was looking for a solution without success.

So far, I have been trying to put the game in an iframe, and I have tried to disable the up / down keys using JS, none of which solves my problem.

Requirements: wmode must be transparentor opaque, and I can not change flash games.

+3
source share
4 answers

It seems that this is simply not the case. We just have to agree that the HTML material (for example, in our chat) will be hiding behind flash games.

But I still hope someone will prove to me that I'm wrong :)

0
source

The only way to prevent scrolling when used wmode=transparentin Flash is to prevent scrolling with the arrow keys for the entire page. This page best describes it.

Basically, when the mode is transparentactive, keyboard events in IE are propagated to the browser; I don't know how to prevent scrolling (not tested), but basically you should prevent keyboard scrolling around the world.

IE8 jQuery . IE, , , .

AFAIK, , Flash wmode=transparent, . , , Flash HTML ( YouTube transparent, , ).

+1

- . .

- , , , . Flash.

0

- JS, .

http://api.jquery.com/keypress/

http://api.jquery.com/event.preventDefault/

KeyPress object/embed. , Flash- id #flashobj

$('# flashobj'). keypress (function (event) {event.preventDefault();});

, , flash-/ , - :

if (event.target.tagName.toLower() == "object" )...

, , event.target ...

I hope the flash catches the keyboard event and the page ignores it. I know that you said you tried, but your approach could be different (I suggested two completely different ways to do this, it could work)

0
source

All Articles