Hide Old and Reveal New Script

[kml_flashembed movie=”/labs/swf/reveal.swf” height=”150″ width=”450″ /]

I was talking the other day with a friend about a small challenge, having 2 images on stage with 2 ideas. 1- have the experience being user driven (in this case the mouse reveals one image while hiding the other) 2- Use XML for easy update. So we fired flash and the above is the visual and the code below… Continue reading Hide Old and Reveal New Script

Flash PHP mySQL – Write to a Database with Flash and PHP

[kml_flashembed movie=”/labs/swf/phpwritetodb.swf” height=”150″ width=”450″ /]

I have written a small script that will assist you into using communication between Flash and PHP to write to a mySQL database. The task is simple, verify the contents of the fields in flash and then send the information to PHP who then writes the information into the database. Continue reading Flash PHP mySQL – Write to a Database with Flash and PHP

Flash Volume Controler ActionScript 2

[kml_flashembed movie=”/labs/swf/volumeExperiment.swf” height=”150″ width=”450″ /]

I had a good friend ask me if I knew of a resource for a volume controler, and I didn’t know of any tutorial or code of the top of my head so I went ahead and wrote it for AS2 so I hope this can help some others out there. Continue reading Flash Volume Controler ActionScript 2

Actionscript Round and keep decimals function

[as]function formatDecimals2 (num, digits) {

if (num < 0 ) { num = 0; } if (digits <= 0) { return Math.round(num); } var tenToPower = Math.pow(10, digits); var cropped = String(Math.round(num * tenToPower) / tenToPower); trace("digits:" + digits + " - " + cropped); } formatDecimals2( 35435.234234, 2); formatDecimals2( 35435.234234, 3); formatDecimals2( 35435.234234, 4);[/as]