开发者

Flex 3 css embed throws "Invalid Embed directive in stylesheet' error on linux

We have a flex application which compiles fine on windows box using mxmlc ant task but when we try to run the same build scripts on linux, it throws the 'Invalid Embed directive in stylesheet' error indicating it is not able to resolve the path to the image files.

Can someone pls. educate me on if there is a difference in the way the image files are looked up, in a CSS file, on windows vs linux.

Flex sdk version is 3.3. The same sdk is used on both windows and linux. Not sure if this has been fixed by any future 3.x sdks.

Thanks i开发者_Python百科n advance.


We had similar problems preparing our project to build with ant task. We are developing under linux. In Flex builder there were no problems finding images - just added path. With ant task well had problems.

Solved problems by copying all needed images to temporary created src/images subdirectory. Then compiler was no more complaining. After build, ant is deleting my temporary directory.


I was running into this issue yesterday. The solution I used was to simply have ant temporarily copy the .css file to the root of the src directory so that the Embed path matches up during the compile process. Follow how the current .css file is copied to a "target.css" in the script below:

    <target name="compile css">

    <copy file="${css-dir}/${css}.css"
          tofile="${resources}/target.css"/>

    <java jar="${FLEX_HOME}/lib/mxmlc.jar"
          fork="true"
          failonerror="true"
            >

        <arg value="-debug=false"/>
        <arg value="-optimize=true"/>

        <arg value="+flexlib=${FLEX_HOME}/frameworks"/>

        <arg value="${resources}/target.css"/>
        <arg value="-output=${css-output}/${css-swf}.swf"/>

        <arg line="${libraryPathArgumentLine}"/>

        <arg value="-static-link-runtime-shared-libraries=true"/>

    </java>

    <delete file="${resources}/target.css"/>
</target>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜