banner ad

Tuesday, February 27, 2007

Bitmap Draw »

In a previous post I talked about the the draw method.  Draw basically draws a source image or movie clip onto a destination image.  Sort of a snaphot.  This execution is done using the Flash Player vector renderer which automatically...

Monday, February 26, 2007

CopyPixel v2 »

In the last post I described the copyPixel method that copies a rectangular area of the source image to a rectangular area of the same size at the destination point  BitmapData object.  We now use the Point object to precisely position our...

Friday, February 23, 2007

CopyPixel v1 »

CopyPixel  copies a rectangular area of the source image to a rectangular area of the same size at a destination point of the destination BitmapData object. copyPixels(sourceBitmap,sourceRect,destPoint) this is a great method for pixel manipulation...

Wednesday, February 21, 2007

3D sphere in ActionScript 3 »

I rewrote the 3D sphere v1 post in AS3. Coding in ActionScript 3 is not much different as far as the mathematics and functions goe. Though you will notice all the extra sythax and coding necessary to acheive the same effect.  It's all worthit...

Tuesday, February 20, 2007

beginBitmapFill v2 »

One of the great features of the BitmapData class is the ability to take a snapshot of the visual state of anything that has an instance name as a bitmap, such as movie clips, video objects, and text fields. The draw method simply uses the vector renderer...

Thursday, February 15, 2007

bitmapFill bg pattern »

In older versions of flash, if you wanted to create a seameless patterning background using an image, you needed to create a grid of duplicated movieclips.  Needless to say that that technique resulted in somewhat 30 lines of code and eate CPU...

Wednesday, February 14, 2007

bitmapData gradient mask »

Ever wanted to apply a gradient mask to a clip.  The following post applies a circular gradient clip positioned in the middle of the stage as a mask to the bitmap. Use your mouse to move the image and see it fade in and out of the maked region,...

Tuesday, February 13, 2007

draw snapshot as reflection »

Creating a reflection below any type of bitmap is a simple bitmapData operation that utilises the draw method.  Draw basically draws a source image or movie clip onto a destination image.  sort of a snaphot. In order to create the reflection...

Monday, February 12, 2007

load and attachBitmap »

You can display an instance of the BitmapData object inside any movie clip using the new MovieClip.attachBitmap method. In this post, an instance of the BitmapData class is stored in memory and never seen until you decide it is time for it to get rendered...

Wednesday, February 07, 2007

Perlin Noise »

The bitmapData class has PerliNoise, Perlin noise and its various derivatives and enhancements are used throughout...

Tuesday, February 06, 2007

bitmapData Noise »

Noise!  the bitmapData class has noise, guess what it generates noise inside a bitmap and it hardly eats any CPU.  The following code shows  how to access this method.  It is relatyively easy to set up, as for the bitmapData initialisation...

Monday, February 05, 2007

bitmapData paletteMap »

The paletteMap method gives you control over adding color to regions of the bitmap. We define that region by creating a point (xy corrdinates) and drawing a rectangle inside the source bitmap.   paletteMap([sourceBitmap],[sourceRect],[destPoint],[red],[green],[blue],[alpha]); As...

Friday, February 02, 2007

geom rectangle and point »

Next step in working with bitmapData is the flash.geom.Rectangle and the flash.geom.Point class.  What they do....simply create points (xy corrdinates) and draw rectangles inside and existing bitmap.  Why do we need these?  It's the...

Thursday, February 01, 2007

bitmapData ARGB color »

The  Flash 8 Image API uses 32-bit ARGB color values.  You might have seen it in my last post that I defined the bitmap color as 0xFFFFFFFF. That's right, 8 intead of the usual 6  hex values. This might come as a shock to us web designer...