tags:

views:

13

answers:

2

hi i hav tried to covert .mxlml to .swc file using flex builder it's not working when i integrate with other application...can any one say how to get .swc using SDK...pls i need very clearly

A: 

In Flex Builder (Or Flash Builder) you need to create a Flex Library project. Put that mxml file in the library project, right click and select "include in library" from the context menu.

The Flex Library project should generate a SWC with that class which you can then use in other proejcts by adding that SWC to the library path.

www.Flextras.com
A: 

Flextras is right, but a little more clearly (since you haven't accepted it yet):

Within Flex Builder (I'm assuming Flex Builder 3, but it's probably the same in Flash Builder), go to File -> New -> Flex Library Project. Enter a name an click Finish. This creates your project.

Create (or copy) the files you wish to compile into the src folder in your new project. The trick is that when you copy a file to the src, it is NOT automatically included in the library's build, and hence it will NOT end up compiled in the resulting SWC.

To include these files in the library build, right click on the project in the Navigator panel and select Properties. Click on "Flex Library Build Path" on the left, and under the "Classes" tab on the right, click "Select All" (or check the boxes you wish to include manually).

Once your files are included in the library project's build path, simply build the project. The build should happen automatically, but you can go to the Project menu and select "Clean" to be sure. Ensure that your project compiles correctly (no compile errors), and a SWC file should be generated in the bin folder. Note that pretty much whenever you change anything within the project's file structure, you will probably need to repeat the step of clicking "Select All" in the library build path.

Pie21