Posted in xn--kfs74mzzid01b.com edit by wktd on January 7th, 2009
Has anyone found a good way to do this? I've read some articles and posts about it, but I can't seem to get any of the methods to work. I've hacked a way to do and just created a movieclip with a textfield in it then embed text in the textfield, but obvious this is not the ideal solution. Any help would be appreciated.Has anyone found a good way to do this? I've read some articles and posts about it, but I can't seem to get any of the methods to work. I've hacked a way to do and just created a movieclip with a textfield in it then embed text in the textfield, but obvious this is not the ideal solution. Any help would be appreciated.
Hey so this is a fairly easy thing to do once you get it!
import flash.display.*;
import flash.text.TextField;
var myText1:TextField = new TextField();
myText1.text = "something to write in the text area";
this.addChild(myText1);
myText1.x = 110;
myText1.y = 40;^ That code is simply creating a new text field with some text in it and it's positioning it at x=110 and y=40... I can't really see where you embedded the font ( because well, maybe I'm wrong but I think that the thread started meant "embed font" by "embed text" )...You could also add the font in your library, just right click on an empty space in the library, choose New Font, choose the font you want to embed, give it a name and click ok. Then right click on the new font in your library and choose linkage, then choose export for actionscript. You can now use that font in your textFields using htmlText.From memory its something like this
package{
[Embed(source="C:WINDOWSFontssomefont.ttf", fontFamily="foo")] }
Then you can access it directly using its font family name.
http://www.marcosweskamp.com/blog/archives/000113.html#If you have any other info about this subject , Please add it free.# |
|