Flash Builder prepares files.
For such a directory structure:
projectdir/src/Main.mxml projectdir/src/views/SomeView.mxml projectdir/src/assets/MyImage.png
And if SomeView.mxml refers to the assets /MyImage.png, Flash Builder will allow this:
@Embed('assets/MyImage.png')
because it is pre-processed by /assets/MyImage.png using the IDE, but ant / maven + mxmlc will not do this.
@Embed('/assets/MyImage.png')
works for both Flash Builder and mxmlc.
If you use the relative path as follows:
@Embed('../assets/MyImage.png')
try changing it to this, oddly enough:
@Embed('/../assets/MyImage.png')
The host / translates to "my src directory", and mxmlc does the rest of the calculation of the path from there.
Hope this helps.
source share