03.07.2013 Views

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

Guide de reference du langage ActionScript 2.0 - PowWeb

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

onStatus (gestionnaire Microphone.onStatus)<br />

onStatus = function(infoObject:Object) {}<br />

Invoqué lorsque l'utilisateur autorise ou refuse l'accès au microphone. Si vous souhaitez<br />

répondre à ce gestionnaire d'événements, vous <strong>de</strong>vez créer une fonction pour traiter l'objet<br />

d'informations généré par le microphone.<br />

Lorsqu'un fichier SWF tente d'accé<strong>de</strong>r au microphone, Flash Player affiche une boîte <strong>de</strong><br />

dialogue Confi<strong>de</strong>ntialité permettant à l'utilisateur d'autoriser ou <strong>de</strong> refuser l'accès.<br />

■ Si l'utilisateur autorise l'accès, la propriété Microphone.muted est définie sur false, et ce<br />

gestionnaire d'événements est appelé avec un objet d'informations dont la propriété <strong>de</strong><br />

co<strong>de</strong> est « Microphone.Unmuted » et la propriété <strong>de</strong> niveau « Status ».<br />

■ Si l'utilisateur refuse l'accès, la propriété Microphone.muted est définie sur true, et ce<br />

gestionnaire d'événements est appelé avec un objet d'informations dont la propriété <strong>de</strong><br />

co<strong>de</strong> est « Microphone.Muted » et la propriété <strong>de</strong> niveau « Status ».<br />

Pour déterminer si l'utilisateur a refusé ou autorisé l'accès au microphone sans traiter ce<br />

gestionnaire d'événements, utilisez la propriété Microphone.muted.<br />

Remarque : Si l'utilisateur choisit d'autoriser ou <strong>de</strong> refuser définitivement l'accès à tous les<br />

fichiers SWF d'un domaine spécifié, cette métho<strong>de</strong> n'est pas appelée pour les fichiers SWF <strong>de</strong><br />

ce domaine sauf si l'utilisateur modifie ultérieurement le paramètre <strong>de</strong> confi<strong>de</strong>ntialité.<br />

Pour plus d'informations, consultez Microphone.get().<br />

Disponibilité : <strong>ActionScript</strong> 1.0 ; Flash Player 6<br />

Paramètres<br />

infoObject:Object - Paramètre défini selon le message d'état.<br />

Exemple<br />

L'exemple suivant affiche la boîte <strong>de</strong> dialogue Confi<strong>de</strong>ntialité permettant à l'utilisateur<br />

d'autoriser ou <strong>de</strong> refuser l'accès au microphone lorsqu'il clique sur un hyperlien. Si<br />

l'utilisateur choisit <strong>de</strong> refuser l'accès, muet s'affiche en texte rouge <strong>de</strong> gran<strong>de</strong> taille. Si l'accès au<br />

microphone est autorisé, ce texte n'apparaît pas.<br />

this.createTextField("muted_txt", this.getNextHighestDepth(), 10, 10, 100,<br />

22);<br />

muted_txt.autoSize = true;<br />

muted_txt.html = true;<br />

muted_txt.selectable = false;<br />

muted_txt.htmlText = "Click<br />

Here to Allow/Deny access.";<br />

this.createEmptyMovieClip("sound_mc", this.getNextHighestDepth());<br />

var active_mic:Microphone = Microphone.get();<br />

Microphone 819

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!