After the interesting actionscript.it conference I decided to give more of my free time to Flex2 and expecially to components creation.
I must admit that ActionScript 3.0 documentation is probably the best documentation I ever seen about flash, but I can’t say the same thing about Flex developement.
Once I had to look for advanced features of Flex components, advanced compiler options etc.. I began to slam against a wall. The developer compoents guide is incomplete and does not cover all the aspects and it has some errors probably due to incorrect revision after the beta program.
So I had to search in the livedocs, but here there are missing links (many links still point to the beta version and they’ve benn removed) and the informations are spread in completely different pages…
The problem with the compiled SWC file is that Flex displays also all the other classes used in the component as they are different UI components and I didn’t find anywhere how to compile with compc an swc file which exposes just the UIComponent I want. The documentation says about “-include-component” compiler option, but it’s an error because the compiler does not allow that option!
This is the script I’m using for compiling it:
compc -source-path="." -namespace http://www.sephiroth.it/2006/mxml mxml-manifest.xml -if assets.swf images\assets.swf -if CPicker.png CPicker.png -include-namespaces http://www.sephiroth.it/2006/mxml -output "C:\Program Files\Adobe\Flex Builder 2\Flex SDK 2\frameworks\libs\sephiroth\CPicker.swc"