add initialization function
use absolute path for all output functions
fix bug in allocating memory for SWFArray