Flash 8 - bitmapFont class
Tuesday, October 4th, 2005Here is class for bitmapFont I’ve created for my project.
There is just numbers inside, but you can extend font to your need.
Please let me know if class is useful for you.
|
[as]import flash.display.*;
import flash.geom.*; import com.franto.flash8.*; class bitmapFont { function bitmapFont() {} public static function drawText(bmp:BitmapData, color:Number, text:String, position:Point,zoom:Number) { var x = position.x; var __font:Object = new Object(); var bits = 3; var len = text.length; for (var j=0;j
|
|
And here is example how to write 0123456789 with zoom=3: |
|
[as]bitmapFont.drawText(bmp, 0xffff0000, “0123456789″, new Point(10,10), 3);[/as]
|
|
Download class |
Enjoy.
tagged under:





No Comments Yet
You can be the first to comment!
Live Preview
Leave a comment