简体   繁体   English

如何在Flash Builder项目中使用SWC文件

[英]how to use swc file in flash builder project

HI.. i have a swc file i have added file to my project using http://interactivesection.files.wordpress.com/2008/11/use_flash_code_library_in_flex.jpg how can i use this component in my flash builder project. 嗨..我有一个swc文件,我已使用http://interactivesection.files.wordpress.com/2008/11/use_flash_code_library_in_flex.jpg将文件添加到我的项目中,如何在Flash Builder项目中使用此组件。 thanks 谢谢

After adding the swc to the project as shown in your screengrab, you can just use any of the classes in the swc as you would any other class in your project: 将swc添加到项目中后,如屏幕抓图所示,您可以像使用项目中的其他任何类一样,仅使用swc中的任何类:

AS: 如:

import some.package.in.my.swc.SomeClass;

private var someClass:SomeClass;

MXML: MXML:

Add a namespace to the top level tag that points to a package in the swc, such as xmlns:library="some.package.in.my.swc.*", then add tags like so: 将名称空间添加到指向swc中的软件包的顶级标记中,例如xmlns:library =“ some.package.in.my.swc。*”,然后添加标记,如下所示:

<library:SomeComponent/>

Hope that helps. 希望能有所帮助。

Project Properties | 项目属性| Flex Build Path | Flex构建路径| Add SWC 添加SWC

and then to use a component import it in your ActionScript class 然后使用组件将其导入到ActionScript类中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM