Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
42 lines (35 loc) · 1.01 KB

File metadata and controls

42 lines (35 loc) · 1.01 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package
{
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
public class MTTextField extends TextField
{
private var myFormat:TextFormat ;
public function MTTextField(color:uint=0,size:Number=20,Font:String = "B Yekan Regular",align:String = TextFormatAlign.CENTER , lineSpacing:Number = 0 )
{
super();
//1 generate required textFormat
myFormat = this.getTextFormat() ;
myFormat.size = size ;
myFormat.font = Font ;
myFormat.align = align ;
myFormat.leading = lineSpacing ;
this.textColor = color ;
//2 set sample text to set format
this.text = '1234' ;
//3 set text format in two ways
this.setTextFormat(myFormat) ;
this.defaultTextFormat = myFormat ;
//4 initialize the textField
this.embedFonts = true ;
this.selectable = false;
this.multiline = false ;
this.wordWrap = false ;
//5 set textField height
this.height = this.textHeight ;
//6 Clear the textField
this.text = '' ;
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.