Hudzilla.org - the homepage of Paul Hudson
Contents > Multimedia Wish List | Report Bug | About Me ]

11.5     Creating Flash

This is NOT the latest copy of this book; click here for the latest version.

Flash generation is such a hotly-contested topic that I really had second thoughts about running the second part of this series! While the incredible creativity offered by Flash movies is all very well, many users are totally put off sites that insist on Flash content - sometimes due to its seemingly spurious animation possibilities, but often also due to its need for a browser plug-in which many don't have.

A lot of development work has been done by the Unix community to make a free-for-all version of a Flash generation library, and PHP has support for two Flash libraries: libswf, and Ming. libswf is fairly old, closed-source, and is not developed any more, so generally people tend to skip by it. Ming, however, is LGPL, object-oriented, and actively maintained. If you are too young to remember "Flash Gordon", you may miss the Ming naming humour!

For the purpose of this article, we will be using the Ming extension to PHP. If you don't have it installed and want to try out code examples as you read, go ahead and read the box-out "Installing Ming".

Before you begin, note that very often you need to tweak objects in your movie to get them to work just as you want them to. I have found in the past that a movie which looks perfect in Mozilla on Linux looks slightly off in IE on a Mac causing me to have to make minor changes to bring them into line.

Also, it is important to note that all values specifying some form of distance, length, height, or size are in twips, which is twenty units per pixel. Flash movies scale to fit their container, though, so these measurements are entirely arbitrary figures.





<< 11.4.10 PDF without a module?   11.5.1 A simple movie >>
Table of Contents
Want to see this stuff in print? PHP in a Nutshell takes the core topics covered here, adds in thousands of edits from the editorial team and myself, and combines them to make an unbeatable reference for PHP programmers at all levels.



My latest book has hundreds more tips on how to use PHP, Apache, and MySQL, plus Perl, Python, shell scripts, performance tuning, and more!



Top-right shadow
 
Bottom-left shadow Bottom shadow

Comments from other readers
Pietro - 16 Oct 2008

Where can I find a library of all for PHP avaible Flash Functions?



Add comment
Please note that by posting a comment here you are committing it to the public domain. This is important so that others can make use of your code themselves, and also so that I can incorporate helpful notes directly into the main text. Comments are limited to 2000 characters in length.

If you are reporting an error in the content, please tell me directly.

Your name/email address:
Your comment:
 
Now, in order to verify that you're a real person, please answer this simple question: what is six plus three?
The answer is:
(please write in
numbers, eg 19)


Top-right shadow
 
Bottom-left shadow Bottom shadow