My friend is working in a flex project.I just helped him in a barcode generation. We just used barcode.swc which is available in adobe.To download barcode.swc click here. Then we explored the sample which is given in that link. Sample which is given in the link is just a swf file but it is not given how to add this swc into our project.So i study the package and class inside the swc. Here is a sample for creating a barcode in flex.
Steps
1. Create a new flex project
2. Add the downloaded "barcode.swc" into the project ( either copy swc into lib folder of your project or manually refer the location of swc in project buildpath)
3. here is the code.
In this sample, I used "Code128B" for barcode generation. There are 5 types of barcodes. Code128B, Code128C, Code39, Code93, CodeI2of5.
The necessary attributes to barcode.
barCodeText="text"
barCodeHeight="50"
addLabel="true"
charGap="5"
xDim="4"
No comments:
Post a Comment