Musicman's Flash experiments

Adding variables

This is actually meant to make flash e-card delivery as painless as possible, but will probably find other uses as well.
To try out, upload an swf file of your own and fill in the text boxes. You will get a movie back with the variables added to the first frame. If your movie has, e.g. a textbox on the main timeline, you can fill it this way. try it download php code

Convert jpeg to swf

Flash player does not currently support direct loading of jpeg images (F6 player will do), so here is a (php and perl) script that converts jpeg (baseline) images to swf.
It includes code from the "add vars" feature as well, so if you use it to send images from a database, you can add information to the image. There is also an option to add the image dimensions as actionscript variables, so that the requesting movie can place and resize an image. try it download php code

Local webserver

This is intended to create web-style applications for local use. While there are stand-alone web servers for various OS, they probably still require some configuration that the end user may not want to do. Also, solutions that combine a flash player with some database are inherently restricted to run on one kind of OS only.
For true platform independence the entire server is written in perl and should work with any recent perl installed on the computer. The actual user scripts are "sort of" cgi style.
If there is no need to store data on the user's computer (like a searchable product catalog), all paths can be made relative so the resulting product will work from the cd.
Products based on this server will be accessed by http://localhost: where the actual port number is specified in the script.
download code

Swf analyzer

Like Macromedia's swfdump, but more info on certain details... updated to handle FMX compressed files !!
Download swf.h and swfparse.c and compile
Try out here.

3rd party server solutions

You may have fallen prey to macromedia's security policy which does not allow a loadvariables from (to) a server other than the one that holds your swf movie. This applies in particular to non-scripted servers like geocities, if you want to use a mail form in your movie.
Actually there is no such thing as impossible - while loadvariables is blocked, loadmovie is allowed although it can be (ab)used in the same way as loadvariables and even geturl. So if you have access to a different server with full scripting (as an example, 5 MB on a vr9.com account in addition to your homepage), you can use this code to add mail feature to your site.
description and suggested code on www.flashkit.com

send mail using provider's formmail

This is another variation on the same topic - here is a solution that does not require any scripting, but is limited to sending mails: read more

merge two swf files

this is meant to solve the eternal "preloader starts at 80 %" problem caused by exported library symbols appearing in the first frame. Just updated to handle FMX compressed files !!
Explanation and tryout here
If you want to see how it is done, download swf.h and swfmerge.c and compile

sending movie in the mail

Help yourself and have two different mails sent to yourself - you will notice that some mailers will do better than others). Try to save entire mail as source code / plain text or whatever it might be called, to study the structure. Second example includes actual perl scripts used to send the mails
Script 1 - put your email address here
Script 2 - put your email address here

bar graph - see the bureau of the census at work

Vinyl cutting plotter at work

This example has been done with the MING extension as well as the swf analyzer.

Vote ypur favorite fruit

MING movie talking to a PHP script

Airport style display

Chinese letters

These are HUGE files.... chinese "wallpaper"
showing full font (multibyte character extension) On western system, the dynamic text box will show low byte of those characters only - on japanese system it might show same characters asthe static text above.

Secure high scores

Have you ever made a flash game and wondered why you get so many astronomical scores? this one will make it a bit harder to cheat...

Is this a bug or a feature?
The two text fields reside in a movie clip testclip, they are bound to variables _root.text1 and _root.text2. When the movie loads, it reads a text file
&_root.text1=stuff
and fills the upper box. The buttons are on the main timeline, the actions are
text2 = ''
text2 = text1
text2 = testclip['_root.text1']

You can enter your own text as well and see how the buttons operate. The post sends data to the server and back to to lower textfield

About passing arrays to flash

Just some interesting reading ....

Feel free to sign my guestbook