AS3 Traces the bitmap as "[Object Shape]" / Error or function, locomotive moving

I need to use GetPixel32 for an object in a movie clip.

to get to this object i use:

var bitmap=clip.getChildAt(0);
//and then 
bitmap.bitmapData.getPixel32(x, y);

however, although childobject is png, I get an error and using

trace(clip.getChildAt(0));

trace "[Object shape]"

why does flash convert certain bitmaps into shapes?

Please check this box ( http://www.sendspace.com/file/uycmm5 ) to check it yourself.

Any ideas?

+5
source share
1 answer

, Flash, ( ) , () , Bitmap.

:

var shape:DisplayObject = clip.getChildAt(0);
var bmp:BitmapData = new BitmapData(shape.width, shape.height, true, 0);
bmp.draw(shape);
bmp.getPixel32(x, y);
+10

All Articles