我正在使用ActionScript 3.在FlashDevelop中开发。当我尝试import fl.controls.Label;
Definition fl.controls:Label could not be found.
我对Flash很新。我让这个项目没有出现故障。我必须改变一些东西才能停止识别导入。即使 Intellisense 也可以选择添加fl.controls.Label
答案 0 :(得分:8)
fl.controls命名空间中的控件是Flash Professional的原生。
虽然我不使用Flash Develop,但这与Flash Builder类似。
如果您有Flash Pro,则可以创建组件库,然后导出SWC库以在Flash Develop项目中使用。或者,参考Flash Pro的控件。
如果以前在您的项目中有效,那么您的编译器设置可能不再链接所需的SWC依赖项吗?
不确定这是否会有所帮助,但我会在Flash Builder中使用它:
Flash组件:
SWC添加:
从Flash中添加libs,例如flash.swc或IK,具体取决于您拥有的Flash IDE版本以及安装位置。
C:\ Program Files(x86)\ Adobe \ Adobe Flash CS5.5 \ Common \ Configuration \ ActionScript 3.0 \ libs \ flash.swc
按源文件夹添加:
Flash组件应位于路径类似于以下的位置,具体取决于您拥有的Flash IDE版本以及安装位置。
C:\ Program Files(x86)\ Adobe \ Adobe Flash CS5.5 \ Common \ Configuration \ Component Source \ ActionScript 3.0 \ User Interface
...或...
C:\ Program Files \ Adobe \ Adobe Flash CS5 \ Common \ Configuration \ Component Source \ ActionScript 3.0 \ User Interface
默认的playerglobal命名空间。
在Flash Builder中从Flash进行编辑时,默认的package / playerglobal.swc引用通常不正确。
在.actionScriptProperties中,添加:
<libraryPathEntry kind="3" linkType="1" path="${FLASHPRO_APPCONFIG}/ActionScript 3.0/FP10.2/playerglobal.swc" useDefaultLinkType="false"/>
答案 1 :(得分:3)
如果您需要普通的fl。*库,请复制此swc:
/Applications/Adobe Flash CS6/Common/Configuration/ActionScript 3.0/libs/flash.swc
使用以下步骤进入Flash Builder项目: