Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
396 views
in Technique[技术] by (71.8m points)

actionscript 3 - Flash security settings panel - Listening for close event?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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; 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...