Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Definition fl.controls:Label could not be found

I'm using ActionScript 3. Developing in FlashDevelop. I get the following error when I try to do import fl.controls.Label;

Definition fl.controls:Label could not be found.

I'm pretty new to Flash. I had this project working without a glitch. I must have changed something for it to stop recognizing the import. Even Intellisense gives me an option to add fl.controls.Label

like image 322
dev.e.loper Avatar asked Dec 12 '22 04:12

dev.e.loper


2 Answers

Controls in the fl.controls namespace are native to Flash Professional.

Although I don't use Flash Develop, this is similar to Flash Builder.

If you had Flash Pro you could create a library of components, then export a SWC library for use in your Flash Develop project. Or, reference Flash Pro's controls.

If this previously worked in your project, perhaps your compiler settings no longer link a required SWC dependency?

Not sure if this will help, but I would follow this in Flash Builder:

Flash Components:

Adding by SWC:

  • Right-click on your project in Flash Builder, and go to Properties.
  • Select "ActionScript Build Path" from the left.
  • Go to the "Libary path" tab now available on the right.
  • Click "Add SWC..."
  • Add libs from Flash such as flash.swc or IK, depending on what version of the Flash IDE you have and where you installed it.

    C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\ActionScript 3.0\libs\flash.swc

Adding by source folder:

  • Right-click on your project in Flash Builder, and go to Properties.
  • Select "ActionScript Build Path" from the left.
  • Go to the "Source path" tab now available on the right.
  • Click "Add Folder..."
  • The Flash components should be in a location with a path similar to the following, depending on what version of the Flash IDE you have and where you installed it.

    C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\Component Source\ActionScript 3.0\User Interface

    ...or...

    C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\Component Source\ActionScript 3.0\User Interface

Default playerglobal namespace.

Default package / playerglobal.swc reference often is incorrect when editing from Flash in Flash Builder.

In .actionScriptProperties, add:

<libraryPathEntry kind="3" linkType="1" path="${FLASHPRO_APPCONFIG}/ActionScript 3.0/FP10.2/playerglobal.swc" useDefaultLinkType="false"/>
like image 134
Jason Sturges Avatar answered Dec 19 '22 12:12

Jason Sturges


If you need general fl.* libraries, copy this swc:

/Applications/Adobe Flash CS6/Common/Configuration/ActionScript 3.0/libs/flash.swc

Into your Flash Builder project using these steps:

Adding a swc to Flash Builder

like image 30
NateJC Avatar answered Dec 19 '22 13:12

NateJC