AS3 problem – Flex compile error

23 08 2007

I came across this issue today. Hope the following blog entry helps.

I created a subclass of MovieClipAsset, which had to link to some graphics created by Flash. So I had this code in the subclass:
[Embed(source=”./swf/items.swf”, symbol=”item”)]

However, Flex keeps giving me an error on this line, saying “unable to resolve ‘./swf/items.swf’ for transcoding.
I tried to move the swf file and replace the code with the following:
[Embed(source=”swf/items.swf”, symbol=”item”)]
[Embed(source=”../swf/items.swf”, symbol=”item”)]
Both gave me the same error message.

The final solution was to have this:
[Embed(source=”/swf/items.swf”, symbol=”item”)]
and it is working fine.

I couldn’t find documentation on this issue. But I guess that is how it works. Let me know if you have any comments please. Thanks.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: