初步理解as3.0文本

1.建立文件test.fla,Size:500*400;Fps:30;

2.新建test.as文件,与test.fla同目录,并且包名不用取,直接写类

3.提一下在test.fla舞台属性size同属性面板中有class类连接处,填上类名,这样你可以直接从这个属性面板中直接打开as文件

4.以下就是test.as中的测试代码,输入在舞台上的TextField

package {

import flash.display.Sprite;

import flash.text.TextFieldAutoSize;

//import flash.text.TextField.backgroundColor;

//import flash.text.TextColorType;

//import fl.controls.Button;

public class getFace extends Sprite {

public function getFace() {

box_t.text=tjp();

tjp2();

var s=new Boolean();

s=(3==1+2);

if (s.valueOf()) {

box_t2.text=("true is oksafasfsafsaf");

}

box_t2.autoSize=TextFieldAutoSize.LEFT;

var _txt=new TextField();

_txt.autoSize=TextFieldAutoSize.LEFT;

_txt.x=300;

_txt.y=300;

_txt.alpha=9;

_txt.border=true;

_txt.backgroundColor=0xff0000;

_txt.borderColor=0xff0000;

_txt.text="create TextField success!sfafdasf";

addChild(_txt);
}

private function tjp():String {

return "taoring.comsfafdasfsfas"
;

}

private function tjp2() {

box_t2.htmlText="ok";

}

}

}


ps:只是简单的文本的一些属性,backgroundColor属性的取值问题?
ps2:import flash.text.*?