I have problem when I try to run unit test when I embed an Image

        [Embed(source="assets/Pen.png")] 
    [Bindable]
    private var PenImageClass:Class;
    private var penCursor:Bitmap= (new PenImageClass());

the error message is :

unable to resolve 'assets/Pen.png' for transcoding

but when I commented the [Embed(source="assets/Pen.png")] It works correctly. > How can I resolve this.

有帮助吗?

解决方案

try to add the assets folder directly beside the as file, the Flex Unit should understand that.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top