Adobe AIR呼叫SoftKeyboardType电话IOS
答
下面是一个使用数字键盘,并限制输入的数字为例:
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.geom.Rectangle;
import flash.text.ReturnKeyLabel;
import flash.text.SoftKeyboardType;
import flash.text.StageText;
public class StageTextNumber extends Sprite
{
public function StageTextNumber()
{
var text:StageText = new StageText();
text.softKeyboardType = SoftKeyboardType.NUMBER;
text.restrict = "0-9";
text.returnKeyLabel = ReturnKeyLabel.GO;
text.stage = this.stage;
text.viewPort = new Rectangle(10, 10, 300, 40);
}
}
}
是的,我知道SoftKeyboardType.NUMBER,但这个我不能键入#+ *符号 –
@VakhtangiBeridze我知道,但这是AIR中唯一的可能性。 –