Function for swf conversion was copied from book_field module