Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.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
Actionscript 3 找不到错误消息类型的原因或该类型不是编译时常量:SuperPanel_Actionscript 3 - Fatal编程技术网

Actionscript 3 找不到错误消息类型的原因或该类型不是编译时常量:SuperPanel

Actionscript 3 找不到错误消息类型的原因或该类型不是编译时常量:SuperPanel,actionscript-3,Actionscript 3,功能:拖放(在标题栏上)调整处理程序大小关闭按钮打开新面板正常/最大屏幕显示面板焦点]]> 在上面的flex代码中,使用superpanel时出现错误 找不到类型或类型不是编译时常量:SuperPanel 出现这些错误消息的原因是什么?可能的原因: 命名空间ext指向错误的包 超级面板不存在于该包中 超级面板类中的编译错误 超级面板位于库中,此库未成功编译 <mx:Script> <![CDATA[ import mx.controls.Aler


功能:
拖放(在标题栏上)
调整处理程序大小
关闭按钮
打开新面板
正常/最大屏幕
显示面板焦点]]>

在上面的flex代码中,使用superpanel时出现错误 找不到类型或类型不是编译时常量:SuperPanel 出现这些错误消息的原因是什么?

可能的原因:

  • 命名空间ext指向错误的包
  • 超级面板不存在于该包中
  • 超级面板类中的编译错误
  • 超级面板位于库中,此库未成功编译
<mx:Script>
    <![CDATA[
        import mx.controls.Alert;
        private var createdWindows:Number = 0;
        private var minimizedWindows:Number = 0;
        private var mWindowArray:Array;

        private function addPanelHandler(pTitle:String = "SuperPanel ", pWidth:Number = 250, pHeight:Number = 180):void {
            this.createdWindows += 1;
            var curNum:Number = this.numChildren + 1;
            var child:SuperPanel = new SuperPanel();

            child.showControls = true;
            child.enableResize = true;

            child.title = pTitle + curNum;
            child.width = pWidth;
            child.height = pHeight;
            child.x = this.createdWindows * 20;
            child.y = this.createdWindows * 20;

            this.addChild(child);
        }
    ]]>
</mx:Script>

<mx:Style source="assets/css/styles.css"/>

<mx:Label text="SuperPanel v1.5 component explorer" right="10" top="10" 
          fontSize="18" fontWeight="bold" fontFamily="Arial" color="#ffffff"/>

<mx:Text width="220" right="10" y="45">
    <mx:htmlText>
        <![CDATA[<font color="#ffffff" size="14"><b>Features:</b><br />- Drag 'n Drop (on titlebar)<br />- Resize handler<br />- Close button<br />- Open a new panel<br />- Normal/max screen<br />- Give a panel focus</font>]]>
    </mx:htmlText>
</mx:Text>

<ext:SuperPanel id="panel01" title="SuperPanel 01"
                x="35.5" y="45" width="345" height="180"
                layout="absolute" showControls="true" enableResize="true">
</ext:SuperPanel>

<ext:SuperPanel id="panel02" title="SuperPanel 02"
                x="361.5" y="264" width="357" height="353"
                layout="absolute" showControls="true" enableResize="true">
</ext:SuperPanel>

<mx:Canvas id="minimizedWindowContainer"
           width="100%" height="53" bottom="0"
           backgroundColor="#efefef"
           borderSides="top" borderThickness="3" borderColor="#666666" borderStyle="solid">
    <mx:HBox id="mWindowContainer" left="0" right="200" height="100%"/>
    <mx:Button right="10" verticalCenter="0" label="Add new SuperPanel" click="this.addPanelHandler()"/>
</mx:Canvas>