Flash安全设置面板 - 聆听关闭事件? [英] Flash security settings panel - Listening for close event?

查看:91
本文介绍了Flash安全设置面板 - 聆听关闭事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用麦克风或相机使用Flash时,系统会提示用户允许访问这些设备。这是通过内置的安全设置面板完成的。



当用户点击安全设置面板的关闭按钮时,有没有办法通过事件处理程序通知?这似乎不可能...



对于麦克风,当用户更改安全面板中的设置时,可能会收到状态事件,但是事件被触发,而用户仍然打开面板。

解决方案

尝试搜索解决方案时,我偶然发现。 / p>

Flash Player错误报告与替代方法



我还没有测试解决方法,但是它应该仍然可以工作吗?祝你好运。



修改



不能访问Adobe bug跟踪器,以下是Philippe Piernot最近发布的解决方法:

  var closed:Boolean = true; 
var dummy:BitmapData;
dummy = new BitmapData(1,1);

try
{
//尝试捕获舞台:设置对话框打开时触发安全错误
dummy.draw(stage);
}
catch(错误:错误)
{
closed = false;
}

dummy.dispose();
dummy = null;


When using Flash with a microphone or camera, the user is prompted to allow access to those devices. This is done through the built in security settings panel.

Is there a way to be notified by an event handler when the user clicks on the close button of the security settings panel? This does not seem to be possible...

For the microphone, it is possible to receive a status event when the user changes the settings in the security panel, but this event is triggered while the user still has the panel open.

解决方案

I stumbled on this when attempting to search for a solution.

Flash Player bug report WITH WORKAROUND

I haven't tested the workaround, but it should still work? Good luck.

Edit:

For anyone who can't/won't access the Adobe bug tracker, here is the workaround originally posted by Philippe Piernot:

var closed:Boolean = true;
var dummy:BitmapData;
dummy = new BitmapData(1, 1);

try
{
    // Try to capture the stage: triggers a Security error when the settings dialog box is open
    dummy.draw(stage);
}
catch (error:Error)
{
    closed = false;
}

dummy.dispose();
dummy = null; 

这篇关于Flash安全设置面板 - 聆听关闭事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆