0

I'm quite new to AS3 so take it easy on me ;) I'm working on a Flash application and it requires the use of the microphone. I got the Privacy dialog. So far so good.

One of the requirements for using the application is to accept Privacy dialog for using the mic. If the user denies the access to the mic, the application should display again the Privacy dialog.

So...How can I do to display the privacy dialog again and again till the user accept it?

As an example, in the airtime website, after registering with facebook, you get a Privacy Dialog. Clicking on the deny button will make to display another Privacy Dialog.

Updated: Here you can check my code.

public function SecurityDialog () {
        log("hello world");
        mic = Microphone.getMicrophone();
        if (mic != null) {
            log("microphone name: " + mic.name + ", muted: " + mic.muted);
            mic.addEventListener(ActivityEvent.ACTIVITY, this.onMicActivity); 
            mic.addEventListener(StatusEvent.STATUS, this.onMicStatus); 
            // Determine if the user has already allowed access for us
            if (mic.muted) {
                Security.showSettings(SecurityPanel.PRIVACY);
            }
        }
        log("done");
    }

In the privacy dialog, if the user denies the access to the mic and click on the close button, the Privacy dialog should be displayed again. Do you know how can I do that?

Thanks again people

4

2 回答 2

1

StatusEvent不会帮助您,因为它只会通知用户是否接受了对网络摄像头/麦克风的访问。几个月前我也遇到过同样的问题,最后的解决办法是用jQuery去掉SwfObject容器DIV,重新嵌入。是的,这很可怕,但我还没有找到更好的解决方案。

于 2012-10-31T11:17:45.673 回答
1

您是否尝试过:

Security.showSettings(SecurityPanel.PRIVACY);
于 2012-10-31T08:51:11.457 回答