How to import fl package in as3 - actionscript-3

I want to import fl.core.* but I can't find it.
There are only flash.something to import.
What should I do? Do i have to set something in project properties?
Thank you.

You can find the fl classes in the the flash cs install fold.In my experience, we use the classed as a library in the project. You can copy the class to you project or make a library project with the fl classes and use this library in other project.
Here is some information about fl class(where you can find the classes)
fl classes

Thanks you guys. I clearly get it now. I just start with only Flash Developer. However, if you
want to use fl class, you have to start with another program which is Adobe Flash CS5 ( or
5.5 ). I find some fla file and import it into adobe flash CS5, then export it to swc.
So you can copy swc file into your Flash Developer and right click to Add into your project.
Then you can use fl class. I dont know I'm doing it right or wrong but it works.

Related

How to use CocosEditor in Clion

I found CocosEditor and I download it. But after I put it into /plugins, it didn't work.
If I import the Classes of my cocos project, the ide can't find the cocos2d.h

Away3d SWC: some classes are missingg

I downloaded the built version of Away3D 4.1.6 and imported to my Flash Pro CS6. But there some classes are missing:
away3d.entities.Mesh
away3d.entities.Camera
away3d.entities.Sprite3D
maybe other classes, too. (I've not compared).
There are no errors when compiling this code:
var mesh:Mesh = new Mesh(new CubeGeometry());
but, I cannot view the available properties and functions, when I put a dot after the variable mesh.
After this I downloaded source files of away3d, but compiling takes about a minute. So, it gets boring to work. What should I do?
I found this bug too. I solved this problem by generating SWC of their own. Just download source files and create a lib project (FB).
PS. my SWC file is 20% less than default. I don't now why.

Flash Builder and External Library

I have downloaded the as3syndicationlib library from here, but I am having trouble adding it to my project. I dragged the folder into my project > src folder, and when I started importing the files from it (com.adobe.xml.syndication.rss.RSS20) all seemed to be fine, until I hit save. Then I started to get error that say:
Multiple markers at this line:
-1084: Syntax error: expecting identifier before
import.
-The import RSS20 could not be found.
-adobe
-The import rss could not be found.
-The import syndication could not be found.
-The import xml could not be found.
-91 changed lines
I have never used an external library with Flash Builder/Flex/ActionScript3 before so I have no idea what to do. I know that this is probably very simple to do, but I am new at flash builder and flex.
Any help is highly appreciated!
Thanks,
Jacob
EDIT:
I got it to work. What I was doing wrong was I was added source code to my project when I should have added the xmlsyndication.swc file to my project.
You need to add it to a lib folder instead of src... if you don't have a lib folder just make one. Then right click the project in Flash Builder and hit properties, in the menu on the left select Library Path (or something like that), click the Add Folder button and type lib. Do a clean build (Build Menu -> Clean).

Exported SWC doesn't preserve auto-complete functions' parameters' names

I am using Flash CS5 and I have created a large, rarely changing framework that I don't want to be recompiled every time I use it in my projects.
I must be doing something wrong because the "auto-complete" functionality doesn't show the names of the parameters of the functions.
For example, I have a function:
public class Hey {
public function show(name:String, num:Number, data:Array):void {...}
}
I export the SWC file and when I import it into another project, then the auto-complete for this function shows :
show(arg0:String, arg1:Number, arg2:Array):void
So, instead of "name", "num" and "data" I get "arg0", "arg1" and "arg2".
I have downloaded other SWC files and the auto-complete gets the names correctly.
Am I doing something wrong at export-time?
I have never been able to get an SWC generated with the Flash Pro IDE to supply the correct parameter names in code hints. For some reason, the Flash IDE either does not use the same compiler or does not use the same compiler options as the Flex SDK toolkit.
You can generate code-hinting-compatable SWCs with Flash Builder by creating a Flex Library project. The "Flex" part of "Flex Library" is a little misleading. You can build AS3-only SWC files with this project type.
Or if you don't feel like shelling out the money for Flash Builder, you can always download the free Flex SDK and use the compc compiler to generate the SWC for you. It's the same tool set that Flash Builder uses to generate SWCs, so you will get the same code-hinting ability. The syntax is pretty straight-forward if you're used to command line tools:
compc -source-path . -include-classes MyCustomClass -output=MyLibrary.swc
Hopefully someone can post a better answer and prove me wrong, but I've never seen a Flash-generated SWC include the parameters in code-hinting.
I suppose you compile with debug=false but should be debug=true to keep all necessary data in swc including arguments names.
Optimizing libraries means to remove debugging and other code from the library prior to deployment. For normal libraries that you are not using as RSLs, you do not need to optimize. This is because you will likely want to debug against the library during development, so you will need the debug code inside the library. And, when you compile the release version of your application, the compiler will exclude debug information as it links the classes from the library.
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7ad5.html
For me the easiest way was to import the code to a Flash Develop project, and install a plugin to export swc's: http://sourceforge.net/projects/exportswc/
After installing Flash Develop go to Tools » Install Software and install the AIR SDK + ASC 2.0 (Action Script Compiler 2.0).
Furter information here: http://www.flashdevelop.org/community/viewtopic.php?t=2987

The definition of base class ByteArrayAsset was not found

I'm using FlashDevelop4.0.0 RC1 to create AS3 library project, in which I want to import Away3D library. I follow this tutorial to set up my FD.
http://www.mclelun.com/blog/2011/08/flashdevelop-stage3d-away3d/
However, FD generate error message when I use ExportSWC4.2 plugin to compile the project, I got error message said that
at away3d\materials\methods\TerrainDiffuseMethod_NormalizeKernel.as(10): The definition of base class ByteArrayAsset was not found
Can anyone help me with that? Thanks!
p.s.
I also have issue like the following link
http://sourceforge.net/tracker/index.php?func=detail&aid=3401191&group_id=252536&atid=1127375
not sure if it's related to my problem.
Are you downloading the zip package from http://away3d.com/download/ or accessing via SVN / GIT?
http://away3d.com/images/uploads/releases/away3d_4_0_110915.zip
Not sure about their GIT, but I found the SVN repo dated.
I did not see ByteArrayAsset anywhere in the inheritance chain within my version:
away3d.materials.methods.TerrainDiffuseMethod
away3d.materials.methods.BasicDiffuseMethod
away3d.materials.methods.LightingMethodBase
away3d.materials.methods.ShadingMethodBase
mx.core.ByteArrayAsset is an Adobe class.
There's a NormalizeSplats Pixel Bender linkage, but I did not see any Normalize Kernel.
I'd recommend grabbing the Broomstick ZIP package - I had no issues building the SWC with Flash Builder targeting Flash Player 11.