开发者

how to use swc file in flash builder project

HI.. i have a swc file i have added fi开发者_如何学JAVAle 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. 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:

AS:

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

private var someClass:SomeClass;

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:

<library:SomeComponent/>

Hope that helps.


Project Properties | Flex Build Path | Add SWC

and then to use a component import it in your ActionScript class

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜