==================================================================================================== Building the SWF with freeware software: ==================================================================================================== In order to build the AS3 sources, you should download and install Flash Develop (1) and configure Flash Develop for AS3 (2). Scroll down to the section "ActionScript 3 configuration". After installing and configuring you should be able to open the project and build the files. 1) http://www.flashdevelop.org/community/viewforum.php?f=11 2) http://www.flashdevelop.org/wikidocs/index.php?title=Configuration ==================================================================================================== Objects in use: ==================================================================================================== ----------------- fileData object: ----------------- id {String} The unique ID of the file. name {String} The filename (without path). extension {String} The file extension. creationDate {String} The number of milliseconds since midnight January 1, 1970, universal time. modificationDate {String} The number of milliseconds since midnight January 1, 1970, universal time. size {Integer} The filesize in bytes. --------------------- fileProgress object: --------------------- status {String} The status of the file; "idle" Status of the file after it has been added to the queue. "queued" Status of the file after an upload command for this file is issues. "uploading" Status of the file after the upload has started. "uploaded" Status of the file after it has been uploaded succesfully. "cancelled" Status of the file after it has been cancelled. "error (...)" Status of the file in case an error (IO/HTTP/Security) has occured. bytesCompleted {Integer} The number of bytes that have been uploaded for this file. bytesTotal {Integer} The total ammount of bytes for this file. bytesRemaining {Integer} The number of bytes that remain to be uploaded. bytesPerSecond {Integer} The current speed (bytes/second). timeStarted {Integer} The number of milliseconds since midnight January 1, 1970, universal time. timeBusy {Integer} The number of seconds since we started uploading. timeRemaining {Integer} The number of seconds remaining for this upload. progress {Integer} A representation of the progress (in %). ---------------------- queueProgress object: ---------------------- bytesTotal {Integer} The number of bytes in this queue bytesCompleted {Integer} The number of bytes that have been uploaded for the current queue. bytesRemaining {Integer} The number of bytes that remain to be uploaded. bytesPerSecond {Integer} The current speed (bytes/second). timeStarted {Integer} The number of milliseconds since midnight January 1, 1970, universal time. timeBusy {Integer} The number of seconds since we started uploading. timeRemaining {Integer} The number of seconds remaining for this upload. progress {Integer} A representation of the progress (in %). filesAdded {Integer} The number of files added to the queue. filesCompleted {Integer} The number of files that have been succesfully completed. filesRejected {Integer} The number of files that where rejected in the queue. filesErrors {Integer} The number of files that errored while uploading. filesCancelled {Integer} The number of files that the user cancelled. ==================================================================================================== Callbacks (general): ==================================================================================================== ------------------- fileuploaderReady: ------------------- Triggered after the uploader control is ready to communicate. You could (for instance) overwrite the default properties in this way: [widget].setMultiple(true); [widget].setMaxFileSize(-1); [widget].setMaxQueueSize(-1); [widget].setMaxQueueCount(-1); [widget].setMaxThreads(2); [widget].setFilters([]); -------------------- fileuploaderFailed: -------------------- Triggered when the initialization of the uploader control failed ---------- rollOver: ---------- Triggered when the mouse rolls over of the uploader control. ----------- mouseDown: ----------- Triggered when the mouse is down on the uploader control. --------- mouseUp: --------- Triggered when the mouse is released after a mousedown event on the uploader control. --------- rollOut: --------- Triggered when the mouse rolls out of the uploader control. ==================================================================================================== Callbacks (dialog): ==================================================================================================== ------------------- multiDialogOpened: ------------------- Triggered just before the dialog is openend where users can select more then 1 file. Tip: Usefull for displaying a lightbox. ------------------ multiDialogClosed: ------------------ @param args.hasSelection ------------------ Triggered when "browse for multiple files" dialog is closed. You should hide your lightbox here ;) ---------------------- multiDialogCancelled: ---------------------- Triggered when the user had the opportunity to select multiple files, but did not select any files. -------------------- singleDialogOpened: -------------------- Triggered when the "browse for single file" is opened. -------------------- singleDialogClosed: -------------------- @param args.hasSelection -------------------- Triggered when the "browse for single file" is closed. ---------------------- singleDialogCancelled: ---------------------- Triggered when the user does not select a file in the "browse for single file" dialog. ==================================================================================================== Callbacks (queue events): ==================================================================================================== --------------- fileErrorSize: --------------- @param args.fileData --------------- Triggered for every file that is selected, but exceeds the maximum allowed filesize. -------------------- fileErrorExtension: -------------------- @param args.fileData -------------------- Triggered for every file that is selected, but does not match allowed extensions. ------------------- fileErrorNotFound: ------------------- @param args.where ------------------- Triggered when a file was not found in the queue. Gives back which function triggered it: "cancel", "remove" (or) "upload". ---------------- queueErrorSize: ---------------- @param args.fileData ---------------- Triggered for every file that the users tries to add which would exceed the maximum queue size. ----------------- queueErrorEmpty: ----------------- @param args.where ----------------- Triggered when there are no files in the queue. Gives back which function triggered it: "cancel", "remove" (or) "upload". ----------------- queueErrorCount: ----------------- @param args.fileData ----------------- Triggered for every file that the users tries to add which would exceed the maximum queue count. ----------- fileAdded: ----------- @param args.fileData @param args.fileProgress ----------- Triggered for every file that is succesfully added to the queue. ------------- fileRemoved: ------------- @param args.fileData @param args.fileProgress ------------- Triggered for every file that is succesfully removed from the queue. -------------- queueCleared: -------------- @param args.queueProgress -------------- Triggerd when all files have been removed from the queue ==================================================================================================== Callbacks (progress and status events): ==================================================================================================== -------------- queueStarted: -------------- Triggered when the upload of the queue is starting. -------------------- fileUploadStarted: -------------------- @param args.fileData @param args.fileProgress @param args.queueProgress -------------------- Triggered for every file upload that is started. -------------------- fileUploadProgress: -------------------- @param args.fileData @param args.fileProgress @param args.queueProgress ------------------- Triggered whenever a progress event is triggered in Flash. --------------------- fileUploadCancelled: --------------------- @param args.fileData @param args.fileProgress @param args.queueProgress --------------------- Triggered for every file upload that is cancelled. --------------------- fileUploadCompleted: --------------------- @param args.fileData @param args.fileProgress @param args.queueProgress @param args.serverData --------------------- Triggered for every file that is succesfully uploaded. ----------------- fileUploadError: ----------------- @param args.fileData @param args.fileProgress @param args.queueProgress ----------------- Triggered for every file in case an error (IO/HTTP/Security) occured. ---------------- queueCancelled: ---------------- @param args.queueProgress ---------------- Triggered when the queue is cancelled ---------------- queueCompleted: ---------------- @param args.queueProgress ---------------- Triggered when all files have been PROCESSED. This does not mean that all files are succesfully uploaded. You have to compare the queueProgress.filesAdded and queueProgress.filesCompleted properties for this. ==================================================================================================== Methods (general): ==================================================================================================== ------------ setEnabled: ------------ @param boolean Passing false to this function disables the current uploader instance. ------------ setLogging: ------------ @param boolean Passing false to this function disables logging in the current uploader instance. ------------- setMultiple: ------------- @param boolean Passing false to this function disables the selection of multiple files in the current uploader instance. ------------ setFilters: ------------ @param array The file filters which should be shown in the "choose file" dialog. You should pass an array of sets of key-value pairs of the form: { extensions: (semicolon-delimited list of elements of the form "*.xxx", e.g. "*.jpg;*.gif;*.png"), description: (the description to show in the combobox), macType: (MAC-Type) [optional] } An example would be: .setFilters( [ { description: "All files (*.*)", extensions: "*.*" } ] ); ---------------- setMaxFileSize: ---------------- @param int The maximum size of a file (in bytes) which can be added to the queue. ----------------- setMaxQueueSize: ----------------- @param int The maximum size of the entire queue (in bytes). ------------------ setMaxQueueCount: ------------------ @param int The maximum number of files which can be added to the queue. --------------- setMaxThreads: --------------- @param int The maximum number of threads that the uploader instance will use to upload the files. ------------------------ setAutoAdvanceOnCancel: ------------------------ @param boolean Wether to auto-advance to the next file when a file is cancelled by the user. Passing true to this function makes the current uploader instance advance to the next file in the queue (if any) whenever a file is cancelled. ----------------------- setAutoAdvanceOnError: ----------------------- @param boolean Wether to auto-advance to the next file when an error occurs. Passing true to this function makes the current uploader instance advance to the next file in the queue (if any) whenever an error occured. ----------------------- setUploadBackend: ----------------------- @param string The URL of the backend script which handles the server-side file uploads. ----------------------- setUploadField: ----------------------- @param string The fieldname to use when uploading files. ----------------------- setUploadMethod: ----------------------- @param string Specifies how the variables accompanying the file upload request are submitted. Either "POST" or "GET"; "POST" by default. ----------------------- setAssumeSuccessTimeout ----------------------- @param number Specifes the number of seconds which need to elapse before an upload is seen as "succesfull". ----------------------- setHTTPSuccess ----------------------- @param array The HTTP codes which are seen as "success" codes when an upload finishes. ==================================================================================================== Queue management methods ==================================================================================================== -------- remove: -------- @param string The id of the file to remove from the upload queue. -------- cancel: -------- @param string The id of the file to cancel uploading. -------- upload: -------- @param string The id of the file to start uploading. @param object The object containing variables to be sent in the same request as the file upload.