I have a question regarding a Flex4 project using Flash Builder 4. The way the architecture of the project is set up has caused some problems with my component skinning
The project is made up of a number of referenced Flex projects. One project holds all of my stylesheets and skins. The problem I have is that I want to be able to have a skin which has a HostComponent in another linked project. The skin will then have different states and refer to values in its host component. At the moment this does not seem to be possible, is there any way this can be achieved?
I would ideally not have skinning files spread across all the linked projects. Any help would be much appreciated
I recommend that you reorganize your sources so that the skins and their host components are in the same project. And I encourage you to start a Flex Library Project in which you pack all your commonly used components along with their skins.
Then you can start Flex Projects that include this Library Project (if you put them in the same workspace) via Project Properties > Flex Build Path > Library Path > Add project. This has the advantage that you can work on your library as well as on your current project at the same time. If you make a release build of your project then this library will be included automagically
Then you might start another Flex Project (and another one...) and you can always include your library which essentially is a package of your commonly used custom components and AS3 classes. I use this approach as the foundation for all of my projects.
For a higher level of abstraction you could imagine one library for graphics, another one for networking and so on... For me it works well having only one Library Project that forms the base for all of my projects.
An example library structure could be:
If you include your library in your Flex Project then you can access the classes and components of that library simply via xml namespaces and ActionScript imports.
Hope this was helpful. If so, please mark it as such