SubjectTransformator To Transform Any DisplayObject

SubjectTransformator class is a simple utility class that lets you transform (rotate, scale, drag) any DisplayObject on stage. As for now, this class may be the subject of change, so please download latest version before use. You can see the demo below in the article…

Read the rest of this entry »

RayMath class

raymath

While working on newest project I created a simple util class that simulates rays of spot light. It uses DisplayObject hitTestPoint() method to test for ray stream collisions so it does not go beyond the obstacles (corners etc.). Feel free to use RayMath class as you wish

Read the rest of this entry »

Bitmap, BitmapData, ByteArray…

bitmap_converting

Lets see how to convert between Bitmap, BitmapData and ByteArray in few examples:

  • DisplayObject to BitmapData
  • BitmapData to Bitmap
  • BitmapData to ByteArray
  • URL (image) to ByteArray (asynchronous)
  • URL (image) to BitmapData (asynchronous)
  • ByteArray to BitmapData (asynchronous)

Read the rest of this entry »