开发者

Flex - understanding how to properly reference an image in a library project css file

开发者 https://www.devze.com 2023-04-07 11:49 出处:网络
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: Er

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号