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.

var listener:Object = new Object();<br />

listener.onSelect = function(fileRefList:FileReferenceList) {<br />

trace("onSelect");<br />

var list:Array = fileRefList.fileList;<br />

var item:FileReference;<br />

for(var i:Number = 0; i < list.length; i++) {<br />

item = list[i];<br />

trace("name: " + item.name);<br />

trace(item.addListener(this));<br />

item.upload("http://www.yourdomain.com/");<br />

}<br />

}<br />

listener.onComplete = function(file:FileReference):Void {<br />

trace("onComplete: " + file.name);<br />

}<br />

var fileRef:FileReferenceList = new FileReferenceList();<br />

fileRef.addListener(listener);<br />

fileRef.browse();<br />

Voir également<br />

browse (métho<strong>de</strong> FileReferenceList.browse)<br />

removeListener (métho<strong>de</strong><br />

FileReferenceList.removeListener)<br />

public removeListener(listener:Object) : valeur booléenne<br />

Supprime un objet <strong>de</strong> la liste d'objets recevant <strong>de</strong>s messages <strong>de</strong> notification d'événement.<br />

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

Paramètres<br />

listener:Object - Objet qui écoute une notification <strong>de</strong> rappel à partir <strong>de</strong>s écouteurs<br />

d'événements FileReferenceList.<br />

Valeur renvoyée<br />

Boolean - Renvoie true si l'objet est supprimé. Dans le cas contraire, cette métho<strong>de</strong> renvoie<br />

false.<br />

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

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

Saved successfully!

Ooh no, something went wrong!