Created
April 24, 2009 03:55
-
-
Save ericsk/100924 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mx:Script> | |
<![CDATA[ | |
import flash.net.FileFilter; | |
import flash.net.FileReferenceList; | |
import mx.collections.ArrayCollection; | |
[Bindable] | |
private var uploadPhotos:ArrayCollection; | |
private var fileTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg;*.jpeg;*.gif;*.png"); | |
private function addPhotos(): void { | |
var fileRefList:FileReferenceList = new FileReferenceList(); | |
fileRefList.addEventListener(Event.SELECT, onSelect); | |
fileRefList.addEventListener(Event.CANCEL, onCancel); | |
fileRefList.browse([fileTypes]); | |
} | |
private function onSelect(event:Event):void { | |
trace('!!'); | |
} | |
private function onCancel(event:Event):void { | |
trace('onCancel'); | |
} | |
]]> | |
</mx:Script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment