Category Archives: Code Snippets

AS3 Get Visible Bounds of Transparent Display Object

How do you get the height of the visible part of a movie clip or bitmap? I ran into a case last week where I needed to get the with of a masked object. The object was a scrollbar. And … Continue reading

Posted in Code Snippets, Tutorials | Tagged , , , , | 9 Comments

Flipping A BitmapData Image

Here’s a handy code snippet for flipping the pixels of a bitmapdata, and ending up with a new bitmap data that is the mirror image of the original. function flipBitmapData(original:BitmapData, axis:String = "x"):BitmapData { var flipped:BitmapData = new BitmapData(original.width, original.height, … Continue reading

Posted in Code Snippets, Tutorials | Tagged , , , | 5 Comments