Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flash AS3选项卡到文本字段问题(焦点期间可以键入)_Flash_Actionscript 3_Textfield - Fatal编程技术网

Flash AS3选项卡到文本字段问题(焦点期间可以键入)

Flash AS3选项卡到文本字段问题(焦点期间可以键入),flash,actionscript-3,textfield,Flash,Actionscript 3,Textfield,因此,首先,当我没有将tabIndex分配给文本字段时,我可以对它们进行制表并输入它们。当然,我不能确定标签的顺序 当我指定tabIndex时,我可以确定选项卡的顺序,但随后会出现黄色的焦点框,我无法在文本字段中键入内容,除非我在其中单击 有什么帮助吗 编辑,我的代码: 我对所有标签、输入字段和按钮使用TextFieldFactory: public function TextFieldFactory(text:String, fontSize:uint, textfieldType:Strin

因此,首先,当我没有将tabIndex分配给文本字段时,我可以对它们进行制表并输入它们。当然,我不能确定标签的顺序

当我指定tabIndex时,我可以确定选项卡的顺序,但随后会出现黄色的焦点框,我无法在文本字段中键入内容,除非我在其中单击

有什么帮助吗

编辑,我的代码:

我对所有标签、输入字段和按钮使用TextFieldFactory:

public function TextFieldFactory(text:String, fontSize:uint, textfieldType:String, button:Boolean)
    {
        t = new TextField();
        var format:TextFormat = new TextFormat("Diego Regular", fontSize, 0x000000);
        format.align = TextFieldAutoSize.LEFT;
        t.defaultTextFormat = format;
        t.embedFonts = true;
        t.autoSize = TextFieldAutoSize.LEFT;
        t.text = text;
        if(textfieldType == "input") {
            t.type = TextFieldType.INPUT;
            t.autoSize = TextFieldAutoSize.NONE;
            t.border = true;
            t.width = 200;
            t.text = "";
        } else {
            t.type = TextFieldType.DYNAMIC;
            t.selectable = false;
        }
        t.height = 25;
        t.wordWrap = false;
        if(button){
            t.mouseEnabled = true;
            t.background = true;
            this.buttonMode = true;
            this.mouseChildren = false;
            t.backgroundColor = 0x000000;
            t.textColor = 0xFFFFFF;
        }
        addChild(t);
    }

在我创建此工厂新实例的类中,我将tabIndex分配给它。

我必须在TextFieldFactory内部而不是外部分配tabIndex。这就解决了!你明白为什么不能在工厂外分配tabindex吗?