Use a Perl script to automate Flash content

Apr 15, '05 09:39:00AM

Contributed by: Anonymous

I hapen to like some aspects of Flash's interface ability and design. But it is very hard, and not very well documented, regarding how to have Perl manipulate Flash. I wanted a Flash site that could automaticly search my directories for PDF content of stories, poems, etc. So I looked into how Flash loaded external variables, and then made a Perl script (and several other 'glue' pieces) to force Flash and Perl to work together.

Please note: This is very buggy, and prone to some very strange errors at times. Mostly, you'll just have to go into the Terminal and invoke the script and then refresh the SWF. I set up my site as such:

Now, how do you get Flash to update its files every time someone clicks on your site? Simple; have index.html use a frame to send you to the CGI file, and the base.html is the file with your Flash embeded, or in a frame (however you want Flash to be displayed). For instance:
<frameset cols="500" border="0">
<frame src="cgi-bin/loadvars.cgi">
</frameset>
[robg adds: I haven't, nor am I likely to, test this one, given my lack of knowledge of both Flash and Perl.]

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050414152421874