意思就是:用Flash CS创建一个flash,将需要的fl组件拖进舞台,然后导出swc文件
在FlashBuilder中引入该swc,这时就能在代码中直接new这个fl组件了
How to Use Flash CS’s Components in Flex Builder
To generate the .swc file in Flash CS3, we follow these steps:
1) Make a new Flash CS3 ActionScript 3.0 .fla file.
2) Drag the desired component(s) to the Library. In this example, we’ll drag the TextArea component to the Library.
3) Choose File > Export > Export Movie.
4) For File name, enter v3components.swf. (We don’t even want the generated .swf, but there’s no other way to get the .swc to compile.)
5) Select a folder in which to save the .swf file.
6) Click Save.
7) In the Export Flash Player dialog, check Export SWC.
Click OK.
The preceding steps generate two files, cs3 components.swf and v3components.swc, both of which are placed in the folder selected in Step 5.
Now let’s use cs3 components.swc in a Flex Builder project. Follow these steps:
1) In Flex Builder, select File > New > ActionScript Project.
2) For Project name, enter “V3Test.as”.
3) Click Next.
4) For Main source folder, enter “src”.
5) For Main application file, enter “V3Test.as”.
6) On the Library path tab, click Add SWC.
7) Browse to the v3components.swc file from the preceding procedure.
Click Finish.
9) Update the code in cs Test.as so it looks like this:
package {
import flash.display.Sprite;
import fl.controls.TextArea;
public class V3Test extends Sprite {
public function V3Test() {
var t:TextArea = new TextArea();
t.text = "You're not cookin'";
addChild(t);
}
}
}
10) Run the project.








