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.

■ Pour Flash Player 8, la métho<strong>de</strong> NetConnection.connect() n'est pas autorisée si le fichier<br />

SWF appelant est dans le sandbox local avec système <strong>de</strong> fichier.<br />

Pour plus d'informations, voir les sections suivantes :<br />

■ Chapitre 17, « Fonctionnement <strong>de</strong> la sécurité », dans Formation à <strong>ActionScript</strong> <strong>2.0</strong> dans<br />

Flash<br />

■ Le livre blanc sur la sécurité <strong>de</strong> Flash Player 8 disponible à l'adresse : http://<br />

www.macromedia.com/go/fp8_security<br />

■ Le livre blanc sur les API relatif à la sécurité <strong>de</strong> Flash Player 8 disponible à l'adresse : http:/<br />

/www.macromedia.com/go/fp8_security_apis<br />

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

Paramètres<br />

targetURI:String - Pour ce paramètre, vous <strong>de</strong>vez transmettre null.<br />

Valeur renvoyée<br />

Boolean - Si la valeur est false, la connexion a échoué et n'est pas utilisable. Si la valeur est<br />

true, la connexion n'a pas échoué lorsque la métho<strong>de</strong> connect() est appelée, mais cela ne<br />

garantit pas le succès <strong>de</strong> l'opération.<br />

Exemple<br />

L'exemple suivant ouvre une connexion pour lire le fichier vi<strong>de</strong>o2.flv. Sélectionnez Nouvelle<br />

vidéo dans le menu d'options <strong>du</strong> panneau Bibliothèque pour créer un nouvel objet vidéo et<br />

appelez cette occurrence my_vi<strong>de</strong>o.<br />

var connection_nc:NetConnection = new NetConnection();<br />

connection_nc.connect(null);<br />

var stream_ns:NetStream = new NetStream(connection_nc);<br />

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

stream_ns.play("vi<strong>de</strong>o2.flv");<br />

Voir également<br />

NetStream<br />

NetConnection 1001

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

Saved successfully!

Ooh no, something went wrong!