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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

muted (propriété Camera.muted)<br />

public muted : Boolean [lecture seule]<br />

Valeur booléenne spécifiant si l'utilisateur a refusé l'accès à la caméra (true) ou autorisé l'accès<br />

(false) dans le panneau Paramètres <strong>de</strong> contrôle <strong>de</strong> Flash Player. Lorsque cette valeur change,<br />

Camera.onStatus est appelé. Pour plus d'informations, reportez-vous à Camera.get().<br />

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

Exemple<br />

Dans l'exemple suivant, un message d'erreur peut s'afficher si my_cam.muted renvoie true.<br />

Créez une nouvelle occurrence vidéo en sélectionnant Nouvelle vidéo dans le menu d'options<br />

<strong>de</strong> la bibliothèque. Ajoutez une occurrence intitulée my_vi<strong>de</strong>o à la scène. Ajoutez ensuite le<br />

co<strong>de</strong> <strong>ActionScript</strong> suivant à l'image 1 <strong>du</strong> scénario :<br />

var my_cam:Camera = Camera.get();<br />

var my_vi<strong>de</strong>o:Vi<strong>de</strong>o;<br />

my_vi<strong>de</strong>o.attachVi<strong>de</strong>o(my_cam);<br />

my_cam.onStatus = function(infoObj:Object) {<br />

if (my_cam.muted) {<br />

// If user is <strong>de</strong>nied access to their Camera, you can display an error<br />

message here. You can display the user's Camera/Privacy settings again<br />

using System.showSettings(0);<br />

trace("User <strong>de</strong>nied access to Camera");<br />

System.showSettings(0);<br />

}<br />

};<br />

Voir également<br />

get (métho<strong>de</strong> Camera.get), onStatus (gestionnaire Camera.onStatus)<br />

name (propriété Camera.name)<br />

public name : String [lecture seule]<br />

Chaîne spécifiant le nom <strong>de</strong> la caméra actuelle, tel que renvoyé par le matériel.<br />

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

410 Chapitre 2: Classes <strong>ActionScript</strong>

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

Saved successfully!

Ooh no, something went wrong!