Category Archives: Actionscript

Color Programming in Flash

When I first thought about trying to wrap code around color values in Actionscript, years ago, I was super intimidated. I conjured up ideas that it was a world full of complex algorithms and crack-brained theories. That’s really about half true. If your goal is some crazy results then you’re probably going to be dealing [...]
Posted in Actionscript | Tagged , , , | Leave a comment

A better Math.Sin()

Sine waves are great and all, but for us non-mathematicians they are difficult to visualize and tweak. So, lets dissect and analyze this ultra-common trig function. Scalpel, please A sine wave calculation has one core parameter, an angle. In AS3 this angle needs to be in radians. But we can expand this into five parameters [...]
Posted in Actionscript | Tagged , , | 1 Comment

Resizing BitmapData without scaling

Have you ever wanted to resize a BitmapData object without scaling it? Normally you would perform a matrix transformation on it by calling the draw() method, but that also scales it.  So how do you acheive non-scaling resize?  Hopefully this can help explain it: // create something that has BitmapData for me to resize this.bmp [...]
Posted in Actionscript | Tagged , , , , | 8 Comments