PLEASE NOTE: these instructions are very old! (Dominic, 23/11/21) Eventually, I had planned to build a feature into the flash object to do this but as that's currently on hold, I thought I'd share with everyone how to create animations/videos of doodles. I used this method to create the video posted on YouTube at http://www.youtube.com/watch?v=kJEQtQ4CJvY 1. Visit http://{doodlelong_url}/get_draw_path.php and enter the doodle number to get its draw path (a set of co-ordinates the pen followed when the doodle was drawn). 2. This next step might lose a few of you but it's really not that hard. Download PHP from the official site (http://www.php.net) and install it. You don't need a web server or anything else because we're going to run a PHP script using the command line (much faster). You'll need to configure PHP a little in the PHP.ini file beforehand... First, make sure the extension_dir value is pointing to the PHP extensions directory. This will be at C:\Program Files\PHP\ext if you've installed the Windows distribution of PHP. So your value for extension_dir would be either "C:/Program Files/PHP/ext/" or just "./ext/" (relative path). We then need to activate one extension, the GD graphics libraries. There'll be a line further down in your PHP.ini file ;extension=php_gd2.dll. Simply take out the prefixing semi-colon to uncomment it. Save your PHP.ini with these changes and we're ready to run the script! 3. Download the script from http://{doodlelong_url}/files/animate_line.zip Inside the zip file there are two PHP files, animate_line.php and GifMerge.class.php. The latter was written by a fella called László Zsidi so credits to him for that. Copy both files into your PHP directory where the php.exe file resides. I'm assuming you're running Windows, if you're on Linux I'm sure you know what you're doing already. 4. Now before we run the script you need to copy and paste the draw path from step 1 into a text file and save that in the same directory as PHP as well. You should now have php.exe, animate_line.php, GifMerge.class.php and draw_path.txt (for example) all in the same directory. 5. Ok, let's run the script. Open up a command prompt and navigate to the PHP directory. Then type php animate_line.php. You should be prompted for the "Doodle path filename: ". If you're not, we've gone wrong somewhere (post here and I'll try help). Otherwise, enter the name of the file with the draw path in it and press enter. The script should then wizz through the co-ordinates and build a large number of .PNG images numbered 0000000000000000.png - 000000000000000n.png. Each one is a single frame of our doodle's animation. When all frames have been created the script will pause and prompt you whether you want to then "Clearup?". You can leave your command prompt window open in the background at this stage. When we've built a video file from all these single-frame image files, you can then come back to it and type "y" followed by the enter key. The script will then finish off by removing al the .PNG images it just created. So before that... 6. Nearly there. Download Virtual Dub (http://www.virtualdub.org), a neat utility that does wonderful things with AVI video files. Run that and click File->Open video file.... Under the "Files of type:" drop-down you'll notice there's an "Image sequence" option. Select that, browse to your PHP folder and open the first .PNG file in the frame sequence, 0000000000000000.png. Virtual Dub will recognise the remaining files and load them into its view. You can now use the slider at the bottom to scroll through the frames and finally see that doodle in motion! 7. Save down the animation as a video file by clicking File->Save as AVI.... I'll leave you to explore Virtual Dub's settings to optimise the avi file. I'd recommend encoding your video with either the DivX or XViD codecs. We're only dealing with line-art here so you can get away with some fairly heavy compression which'll cut the file sizes down. 8. When you've saved your animated doodle as a video you can go back to your command prompt window and clearup the PNG frame images. That should be all you need. Let me know if you're successful or if you run into any problems. And especially if you come up with anything creative using animated doodles. Dominic Manley (dominic@dominicmanley.com), 28/03/07