Whereas the Flash Player is not open sourced, the .swf file format itself is publicly available (which is one reason it has garnered a lot of third-party support). For further information, here are some resources:
http://www.macromedia.com/software/flash/open/licensing/fileformat
Here you can obtain the SWF SDK from Macromedia, "a set of tools for developers to write Macromedia Flash 5 (SWF) files, documentation of the Macromedia Flash file format (SWF), and code to write SWF files."
A general information center for developers of SWF implementations. Includes tutorials, message boards, resources, and source code.
Ming is an open source C library for generating SWF format movies plus a set of wrappers for using the library in C++ and popular scripting languages like PHP, Python, and Ruby. See http://www.opensource.org for information on open source software.
http://www.2shortplanks.com/flash
A Perl library to allow the "dynamic, programmable generation of Flash/SWF movies." Created by Simon Wistow.
Copyright © 2002 O'Reilly & Associates. All rights reserved.