/ Published in: ActionScript 3
Expand |
Embed | Plain Text
// source for the bitmap data in this case is a text field var tf:TextField = new TextField(); tf.text = "bitmap text"; // create new transparent BitmapData object to hold the captured data // BitmapData(width, height, transparent, color) var myBitmapData:BitmapData = new BitmapData(80, 20, true, 0x000000); // draw the source data into the BitmapData object myBitmapData.draw(tf); // make a new Bitmap object and populate with the BitmapData object var bmp:Bitmap = new Bitmap(myBitmapData); // add Bitmap to stage this.addChild(bmp);
You need to login to post a comment.
