Shvilam
Shvilam

Reputation: 336

as3 StageText cursor does not show up

here is the code that creates the StageText

var myTextField:StageText = new StageText();
myTextField.returnKeyLabel = ReturnKeyLabel.SEARCH;
myTextField.text = tlf.text;
myTextField.editable = true;
myTextField.fontFamily = "Ariel"
myTextField.fontSize = 40;
myTextField.color =  tlf.textColor
myTextField.textAlign = TextFormatAlign.RIGHT
myTextField.stage = stage;
myTextField.viewPort = new Rectangle(p.x,  p.y, tlf.width*screenUtil.xScaleFactor,tlf.height*screenUtil.yScaleFactor);
txtInputVo.stageText = myTextField;
myTextField.locale = "he-IL";
myTextField.addEventListener(FocusEvent.FOCUS_IN, onInFocus);
myTextField.addEventListener(FocusEvent.FOCUS_OUT, onOutFocus);
protected function onInFocus(event:FocusEvent):void
{
    var sTxt:StageText = event.currentTarget as StageText;
    var textInputVo:TextInputVO =  getTextInputVO(sTxt);
    if(textInputVo.defultText == sTxt.text)
    {
        sTxt.text = "";
    }
}

It's working great, the keybord is showing up and you can insert and edit the text but the cursor is not showing up?

I have only tested it on the Android Air 3.6 so far.

Upvotes: 0

Views: 919

Answers (1)

Armin
Armin

Reputation: 78

Try "Arial" not "Ariel" as font family

Upvotes: 1

Related Questions