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.

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

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

}<br />

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

fileRef.addListener(listener);<br />

fileRef.browse();<br />

Voir également<br />

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

creator (propriété FileReference.creator)<br />

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

Type <strong>de</strong> créateur Macintosh <strong>du</strong> fichier. Sous Windows, cette propriété est null. Si l'objet<br />

FileReference n'a pas été renseigné, l'appel effectué pour obtenir la valeur <strong>de</strong> cette propriété<br />

renvoie null.<br />

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

Exemple<br />

L'exemple suivant récupère le type <strong>de</strong> créateur Macintosh d'un fichier choisi par l'utilisateur.<br />

import flash.net.FileReference;<br />

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

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

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

}<br />

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

fileRef.addListener(listener);<br />

fileRef.browse();<br />

Voir également<br />

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

download (métho<strong>de</strong> FileReference.download)<br />

public download(url:String, [<strong>de</strong>faultFileName:String]) : Boolean<br />

Affiche une boîte <strong>de</strong> dialogue permettant à l'utilisateur <strong>de</strong> télécharger un fichier à partir d'un<br />

serveur distant. Flash Player peut télécharger <strong>de</strong>s fichiers jusqu'à 100 Mo.<br />

FileReference (flash.net.FileReference) 585

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

Saved successfully!

Ooh no, something went wrong!