TextField in away3d

Software: Away3D 4.x

Avatar
TrueSign, Member
Posted: 07 January 2012 02:05 PM   Total Posts: 57

Hi,
Is there a easier way to create a Sprite3D with text on it that applying bitmap on it with text? Is there something in Away3d v4 like TextField3D in previous versions?
I used:

var newText:TextField = new TextField();
newText.width 300;
newText.text "My dynamic text";

var 
txtForm:TextFormat = new TextFormat();
txtForm.color 0xffffff;
txtForm.size 48;
newText.setTextFormat(txtForm);
   
var 
btTxt:BitmapData = new BitmapData(10241024true0x000000);
btTxt.draw(newTextnullnullnullnulltrue);
   
var 
myTxtMat BitmapMaterial = new BitmapMaterial(btTxttruefalsetrue);
   
_board = new Sprite3D(myTxtMat12864); 

So there is a text on my Sprite. There is a lot of steps I have to take to accomplish that. Ans still I need to fix UV for a bitmap to make it looks good (not stretch in a corner as it is now). And what if I change a text dynamicly. I have to update all that material. So my question is there a easier way to make it? And if not, can someone help me with align that text on my material to my Sprite3D

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X