When Dealing with Movieclips and you need to access the refence as string do [instanceName].toString() rather than instanceName.toString()
Category: Programming
Always do a garbage collection
As simple as creating a method in your class or a function on your code to delete unnecessary variables or set them to null for garbage collection.
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.
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 […]
Actionscript count and trace the number or arguments passed to a function
[as] var totalArgs = arguments.length; trace(“Number of Arguments passed = ” + totalArgs); for (var i:Number = 0; i < totalArgs; i++) { trace ("Argument "+i + ": " + arguments[i]); } [/as]
Actionscript Round and keep decimals function
[as]function formatDecimals2 (num, digits) { if (num < 0 ) { num = 0; } if (digits
Delete enhanced fill problem
Thats it! I am tired of getting the “Enhanced fill not supported in current player version” problem when I import fills from AI/FH/FW and you need to export to V7 or under, so once and for all I am putting a stop to it. Here are 3 simple steps to get rid of this problem […]
Set a footer on your Flash Movie
[as] stageListener = new Object(); stageListener.onResize = function() { // enter what you want to do on resize, for example: contentHolder_mc._y = Stage.height – contentHolder_mc._height; contentHolder_mc._width = Stage.width; } Stage.addListener(stageListener); stageListener.onResize(); [/as]
Short hand for If Statement
a = b ? true : false; a == b ? (true1, true2) : false
Exporting from Illustrator to SWF “bug”
If you are exporting any artwork from Illustrator to SWF and when working in Flash and player 7(or less) you might get the following error “Enhanced stroke is not supported in this player”. One way to fix this issue is by setting “Perserve Editability Where Possible” under the Method section. Now this might not work […]