flash - AS3: using beginBitmapFill() with a library object -
how can setup .beginbitmapfill() bitmap loaded movie's library? every example i've found on internet uses loader class load bitmap externally, want load library instead.
i want turn:
mesh.graphics.beginfill(0xffffff,1); into
mesh.graphics.beginbitmapfill(..., null, true, false); and have shape filled tiled 'bitmap.bmp' loaded library. major problem how can address library bitmap inside fill method.
add image file library , export actionscript bitmapdata object:

then can write graphics code this:
import flash.display.bitmapdata; import flash.display.shape; var mesh:shape = new shape(); mesh.graphics.beginbitmapfill(new meshbitmapdata(), null, true, false); mesh.graphics.drawrect(0, 0, 400, 400); mesh.graphics.endfill(); mesh.x = mesh.y = 20; addchild(mesh); and this:

Comments
Post a Comment