Make flash plugin from a png
This article's content is incomplete or a placeholder stub. |
This is a guide to creating a Family tree that can be viewed in a web-browser in a convenient way by allowing zooming in and out and navigating the image of the tree.
How ?
Installation of necessary tools
- Install swftools: [1]: latest version date:2011-10-01 swftools-0.9.1.tar.gz 2.5 MB or thru your package manager. Version for Hardy Ubuntu is 0.8.1-1ubuntu1. Collection of utilities for SWF file manipulation/creation SWF Tools is a collection of SWF (Flash) manipulation and creation utilities. This package includes: pdf2swf, jpeg2swf, png2swf, gif2swf, font2swf,wav2swf, swfcombine, swfextract, swfdump, swfstrings, swfbbox and swfc.
- pdf2swf is a PDF to SWF Converter. It generates one frame per page and enables you to have fully formatted text, including tables, formulas etc. inside your Flash Movie.
- jpeg2swf takes one or more JPEG pictures and generates an SWF slideshow.
- png2swf takes one or more PNG pictures and generates an SWF slideshow.
- gif2swf converts GIFs into SWF. It is also able to handle animated gifs.
- font2swf converts font files (TTF, Type1) into SWF.
- wav2swf converts WAV files into SWF.
- swfcombine is a tool for inserting SWFs into Wrapper SWFs. (Templates) E.g. for including the pdf2swf SWFs into some sort of Browsing-SWF.
- swfextract allows to extract Movieclips, Sounds, Images etc. from SWF files.
- swfdump prints out various informations about SWFs.
- swfstrings scans SWFs for text data.
- swfbbox allows to readjust SWF bounding boxes.
- swfc is a tool for creating SWF files from simple script files.
- use the Graphviz plugin to generate a graphical report (see Howto: Make a relationship chart)
Generation of Flash file
Flash is a proprietary format, of which however open implementations exist. You have to install a flash player and a browser plugin, to be able to view a flash file in firefox, konqueror, ...
You can create the flash file as follows:
- If the report image is called "report.png", execute "png2swf -o report.swf report.png" on the command line.
- There should now be a file report.swf, that can be opened in any browser with a flash-plugin. You can zoom by right-clicking in the image and choosing zoom in from the menu, and you can navigate by "dragging the image" inside the window with your mouse.
This has been done with the resulting family tree of Example 2 on Howto: Make a relationship chart.
Enhancements
- It is also possible to use javascript to add zooming by moving the mouse wheel, but he who did it does not remember how at the moment.
- The .dot file generated in example 3 on Howto: Make a relationship chart contains the web-page addresses to the personal pages of the "Narrative Webpage" report pages, and by generating a pdf with the relationship graph report and using pdf2swf, the resulting flash-file contains clickable links for each individual that should work if the swf-file is placed in the same directory as the index.html file of a Narrative We Page report. The alternative way of generating from .dot file can also be used. One way to accomplish this is to run
dot -Tps2 report.dot > report.ps ps2pdf report.ps pdf2swf -o report.swf report.pdf
The resulting swf-file should now work as before, but with the addition of hyperlinks.