提问:类似于自动提款机中的更正按纽怎么实现,有谁知道?就是打出号码之后,点一下清除按纽去掉一个字符。谢谢啊...
附件:
输入.rar(
终极讨厌)解答:
for (var d:Number = 11; d>1; d--) {
this["instance"+d].id = d-1;
this["instance"+d].onRelease = function() {
this._parent._txt.text += this.id<10 ? this.id : 0;
};
}
instance12.onRelease = function() {
this._parent._txt.text = "闪吧!!!";
};
instance13.onRelease = function() {
var _str:String = this._parent._txt.text;
this._parent._txt.text = _str.substr(0, _str.length-1);
};
解答附件:
输入1.rar