Actionscript 3 actionscript透明文本输入背景
经过数小时的搜索,我成功地将字体颜色设置为黄色,但我仍然不知道如何使textinput的背景透明:( (我把它从组件窗口拖了出来) 我的代码有什么问题Actionscript 3 actionscript透明文本输入背景,actionscript-3,background,transparent,textinput,Actionscript 3,Background,Transparent,Textinput,经过数小时的搜索,我成功地将字体颜色设置为黄色,但我仍然不知道如何使textinput的背景透明:( (我把它从组件窗口拖了出来) 我的代码有什么问题 var tf:TextFormat = new TextFormat(); tf.size = 10; tf.color = 0xFFF000; nameField.setStyle("textFormat", tf); nameField.alpha = 0; nameField.background=false;您应该检查文档 如下面的例
var tf:TextFormat = new TextFormat();
tf.size = 10;
tf.color = 0xFFF000;
nameField.setStyle("textFormat", tf);
nameField.alpha = 0;
nameField.background=false;
您应该检查文档
如下面的例子所示
var input:TextField = new TextField();
input.textColor = 0xFFFF00;
input.background = false;
input.backgroundColor = 0x000000;//this is to show that the background is not visible - you can put any colour other than SWF's background:)
input.type = TextFieldType.INPUT;
addChild(input);
TextInput具有样式contentBackgroundAlpha和contentBackgroundColor
nameField.setStyle("contentBackgroundAlpha", 0);
另外,如果你使用FLEX,它就是。(好的,我刚在谷歌上搜索了一下。它是AS3程序员的“必备品”吗?我应该下载吗?不是必备品-这是在AS、FLash IDE、FLEX和纯ActionScript中编程的另一种方式,有第三方编辑器和FLEX SDK来comile。你确定吗:)该背景是文本字段的一部分,而不是下面的形状/精灵?