AS3 bitmaps

2 posts (showing 1-2)

Market Level 0Community Level 3
133 posts

hi there,

im just trying to draw a MC into a bitmap like....

var mysprite:MovieClip = new x();

var mbmd.BitMapData(x.width,x.heigth,false,0x111111);
var bm:BitMap = new BitMap(mbmd);


 but when i run the program the top left corner of x appear aligned with bm's (width/2,heigth/2), why im facing this issue? i want to them being aligned at bm's tope left corner!

any help will be awesome!!

posted 2016-03-03T16:05:10-08:00

Market Level 3Community Level 10
2192 posts

Change the draw line to 


You can then set the x and y of mysprite to fix any position problems (or you could pass a matrix to the draw function but that's a little more work)

posted 2016-03-03T20:14:23-08:00