Flex compiler transcoding error

If you get an error like this from the Flex compiler:

Error: unable to resolve 'assets/images/Back.png' for transcoding

It probably means you specified a relative path where you meant to use an absolute path. Depending on what the compiler’s current directory is when it gets to resolving this asset, it might work, or it might not. It’s the “it works sometimes” that makes it hard to figure out.

The solution is simple: Make the path absolute.

<s:Button ... icon="@Embed('/assets/images/Back.png')" />

Absolute asset paths are resolved against the source path, not the file system root.