Well, this is actually more of a test post than a "real" one. I just read a post on how to integrate the JavaScript library, SyntaxHighlighter, into Blogger.

To illustrate my efforts, I'm going to use some ActionScript 3 code I worked on today. It's nothing crazy, I wanted to limit the types of files a user can open when calling FileReference.browse().

private var fileReference:FileReference;
private var fileFilter:FileFilter;

// create a FileFilter to limit file types
this.fileFilter = new FileFilter("Spreadsheets", "*.csv;*.txt");

//Create FileReference object
this.fileRef = new FileReference()
// Add Handlers (not shown)
this.fileRef.addEventListener(Event.CANCEL, cancelEvent);
this.fileRef.addEventListener(Event.COMPLETE, completeEvent);
this.fileRef.addEventListener(Event.SELECT, selectEvent);
this.fileRef.addEventListener(IOErrorEvent.IO_ERROR, ioErrorEvent);
this.fileRef.addEventListener(ProgressEvent.PROGRESS, progressEvent);
this.fileRef.addEventListener(SecurityErrorEvent.SECURITY_ERROR, traceEvent);
this.fileRef.browse([this.fileFilter]);

The code above was copied from different parts of an MXML component to use as an example. That said, take a look at the FileFilter class if you need to allow uploads from a Flex application. It's pretty sweet and eliminates some of the "dumb" user moves (i.e., loading an XLS file when it's supposed to be a CSV).

Comments