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:

enter image description here

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:

enter image description here


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -