zoukankan      html  css  js  c++  java
  • 1046: 找不到类型,或者它不是编译时常数: Label 解决方案

    package
    {
    import flash.display.MovieClip;
    import fl.controls.Label;
    import fl.controls.TextInput;
    import fl.controls.Button;
    import flash.events.MouseEvent;

    public class Login extends MovieClip
    {
    public function Login()
    {
    var User_Label:Label = new Label();
    User_Label.text = "用户名称:";
    User_Label.x = 100;
    User_Label.y=100;

    var User_Text:TextInput = new TextInput();
    User_Text.x = 180;
    User_Text.y = 100;

    var Pwd_Label:Label = new Label();
    Pwd_Label.text = "用户密码:";
    Pwd_Label.x = 100;
    Pwd_Label.y = 120;

    var Pwd_Text:TextInput = new TextInput();
    Pwd_Text.displayAsPassword = true;
    Pwd_Text.x = 180;
    Pwd_Label.y = 120;

    var Btn_Button:Button = new Button();
    Btn_Button.label = "登陆";
    Btn_Button.x = 140;
    Btn_Button.y = 140;
    Btn_Button.addEventListener(MouseEvent.CLICK,Btn_Click);

    this.addChild(User_Label);
    this.addChild(User_Text);
    this.addChild(Pwd_Label);
    this.addChild(Pwd_Text);
    this.addChild(Btn_Button);
    }
    private function Btn_Click(e:MouseEvent):void
    {

    }

    }
    }
    问题描述:
    1046: 找不到类型,或者它不是编译时常数: Label。
    1046: 找不到类型,或者它不是编译时常数: TextInput。
    1046: 找不到类型,或者它不是编译时常数: Label。
    1046: 找不到类型,或者它不是编译时常数: TextInput。
    1046: 找不到类型,或者它不是编译时常数: Button。
    1180: 调用的方法 Label 可能未定义。
    1180: 调用的方法 TextInput 可能未定义。
    1180: 调用的方法 Label 可能未定义。
    1180: 调用的方法 TextInput 可能未定义。
    1172: 找不到定义 fl.controls:Label。
    1172: 找不到定义 fl.controls:TextInput。
    1172: 找不到定义 fl.controls:Button。
    解决方法:
    用flash开发工具(cs5)打开当前项目  ——> 窗口  ——>组件 ——>找到Label标签拖到舞台上面,然后再删除,问题就解决啦!
  • 相关阅读:
    Windows下memcache安装使用
    Linux 下memcache安装及使用
    C语言第五节scanf函数
    C语言第四节数据类型、常量、变量
    C语言第三节关键字、标识符、注释
    C语言第一节 C语言程序与开发工具
    快到而立之年了,可是能撑得起而立吗?
    idea-安装SequenceDiagram插件-生成时序图
    mysql中 查询一对多关系的时候,获取最新的一条
    判断多个时间段区间是否有重叠
  • 原文地址:https://www.cnblogs.com/chenhaib/p/2078676.html
Copyright © 2011-2022 走看看