My flex (flash builder 4) project references (embeds) a flex library project (ReusableFx). I have it working fine when it builds and runs, but I am struggling with a Design mode error "Design mode: Error during component layout...".
In the flex library project there is a 'default.css' file which references a png file. Specifically like this:
icon: Embed("assets/icons/filter.png");
It works when I build and run, I see the icon, but the problem is that design mode must work differ开发者_C百科ent in flash builder and breaks with this line.
I tried a few things with no difference: - adding a "/" in front - changing it to Embed(source="... - adding the "assets.icons" group and png files to my project - also tried adding a "/" in front - adding a folder named assets and a folder named icons and then putting the png files in to my project. - changing it to reference the library instead of embed in my project
I have a bug open with them, but I am hoping someone could give me some ideas that has worked with css and embeding images.
Try ./ and try run a "Clean" it should resolve, also make sure the path is relative to the project not the css location, its most likely a path resolution issue in the builder.
So I came across a sort-of fix. I decided to test out Flash Builder 4.5 (currently using 4.01). I imported the projects and had the same error. However, FB 4.5 showed me something new: The swc 'C:\Program Files\Adobe\Adobe Flash Builder 4.5\sdks\4.5.1\frameworks\libs\charts.swc' has style defaults and is in the library-path, which means dependencies will be linked in without the styles. This can cause applications, which use the output swc, to have missing skins. The swc should be put in the external-library-path. ReusableFx Unknown Flex Problem
So, I set the project Library Build Path to Framework Linkage of Use Default (external) instead of Merged in to code. Click OK, build, and those new warnings go away.
Now the screen is visible in design mode.
精彩评论