闪光“的wmode”,AS3,箭头键集中在Internet Explorer中,堆叠顺序和可能的解决方案闪光、顺序、解决方案、箭头键

2023-09-08 15:12:25 作者:野心未泯.

当在的wmode煽动和用户正在玩Flash小游戏,需要方向键,在Internet Explorer浏览器窗口也移动。貌似,唯一轮这种方式是去除'WMODE。但是,如果'WMODE'被除去的Flash游戏上升到堆叠顺序的顶部和所有其它元素如可膨胀的横幅或下拉菜单去闪存后面。 iFrame中或CSS再多的解决了这个问题。

我已经找到了解决方案,让的wmode依然存在,同时也使Flash小游戏有一旦点击键盘焦点,因此在Internet Explorer浏览器窗口不动。这种解决方案意味着其他的DOM元素可以去上面的闪光。

我已经把AS3 code以下为一个简单的例子,它似乎工作。它基本上把一个ScrollPane中的内容,然后这将不可见。

作为一个PHP开发人员,而不是AS3开发者,我的问题是 - 可以在任何AS3开发者看到一个问题或将低于code到基于闪存/ AS3内置游戏的不利影响。同样可以这项工作在AS2?

许多AP preciated

  _scrollPane =新的ScrollPane();
_scrollPane.setSize(stage.stageWidth,stage.stageHeight);
_scrollPane.horizo​​ntalScrollPolicy = ScrollPolicy.OFF;
_scrollPane.verticalScrollPolicy = ScrollPolicy.OFF;
_scrollPane.alpha = 0;
stage.addChild(_scrollPane);
 

解决方案 英特尔投资重点在人工智能

在看来这多一点的测试是不是现实可行的选择。虽然swf文件获得焦点,一旦点击,需要方向键控制精灵可以在不影响浏览器窗口,单击或拖动互动精灵移动是由于pvented到滚动的子指数$ P $。

我一直在摆弄pre-发布IE10中,它似乎无论什么状态中的wmode留在(或删除)的浏览器窗口仍然受到与SWF箭头键相互作用。 如果有其他人遇到这个问题,或者找到了答案,将大大AP preciated。

When ‘wmode’ in instigated and a user is playing a Flash game requiring arrow keys, on Internet Explorer the browser window also moves. Seemingly, the only way round this is to remove the ‘wmode.’ But, if the ‘wmode’ is removed the Flash game rises to the top of the stacking order and all other elements such as expandable banners or dropdown menus go behind the Flash. No amount of iFrames or CSS resolves this issue.

I have found a solution that lets the ‘wmode’ remain, whilst also enabling the Flash game to have keyboard focus once clicked and therefore the Internet Explorer browser window does not move. This solution means other Dom elements can go above the Flash.

I have put the AS3 code below into a simple example and it seems to work. It basically puts a scrollPane in the content and then this is made invisible.

Being a PHP developer and not an AS3 developer, my questions is – can any AS3 developers see an issue or detrimental impact of placing the code below into a Flash based/AS3 built game. Equally could this work in AS2?

Much appreciated

_scrollPane = new ScrollPane();
_scrollPane.setSize(stage.stageWidth, stage.stageHeight);
_scrollPane.horizontalScrollPolicy = ScrollPolicy.OFF;
_scrollPane.verticalScrollPolicy = ScrollPolicy.OFF;
_scrollPane.alpha=0;
stage.addChild(_scrollPane);

解决方案

After a bit more testing it appears this is not realistically a viable option. Although the swf file gains focus once clicked and sprites requiring arrow key control can be moved without affecting the browser window, clicking or dragging interaction with sprites is prevented due to the child index of the scrollPane.

I’ve been playing around with the pre-release of IE10 and it appears no matter what state the wMode is left in (or removed) the browser window is still affected by arrow key interaction with the swf. If anyone else has come across this problem or found an answer it would be greatly appreciated.