【发布时间】:2015-10-31 00:26:27
【问题描述】:
我正在尝试使用按钮进行文本输入,但到目前为止我只能让它输入一个数字。 (如果我单击另一个按钮进行第二个输入,它会删除第一个输入。)有没有办法解决这个问题?
我在此处添加了我的代码和一张图片以显示我正在尝试制作的内容。
非常感谢您的帮助!
<mx:Button x="18" y="116" label="1" width="20" height="20" fontSize="7" click="one(event)"/>
<mx:Button x="37" y="116" label="2" width="20" height="20" fontSize="7" click="two(event)"/>
<mx:Button x="56" y="116" label="3" width="20" height="20" fontSize="7" click="three(event)"/>
<mx:Button x="18" y="135" label="4" width="20" height="20" fontSize="7" click="four(event)"/>
<mx:Button x="37" y="135" label="5" width="20" height="20" fontSize="7" click="five(event)"/>
<mx:Button x="56" y="135" label="6" width="20" height="20" fontSize="7" click="six(event)"/>
<mx:Button x="18" y="154" label="7" width="20" height="20" fontSize="7" click="seven(event)"/>
<mx:Button x="37" y="154" label="8" width="20" height="20" fontSize="7" click="eight(event)"/>
<mx:Button x="56" y="154" label="9" width="20" height="20" fontSize="7" click="nine(event)"/>
<mx:Button x="18" y="173" label="x" width="20" height="20" fontSize="7" click="erase(event)"/>
<mx:Button x="37" y="173" label="0" width="20" height="20" fontSize="7" click="zero(event)"/>
<mx:Button x="56" y="173" width="20" height="20" label="ent" fontSize="7" click="ent(event)"/>
public function one(event:MouseEvent):void {
numberCopies.text = "1";
}
public function two(event:MouseEvent):void {
numberCopies.text = "2";
}
...
【问题讨论】:
标签: apache-flex button text textinput