Justin
Justin

Reputation: 1299

When using a swc with embeded files the files are missing but the swc compiles with out errors?

I am making a swc file with code that I have made in actionscript and it works correctly. However after I take all the code and put it into a swc library and it creates the swc with out any compile errors. I go to use the swc and it gives me warnings and want run spaying that

"Description Resource Path Location Type The definition Arrow.Right_png$c7cf89b0fd8fa396e54e299a767d2beb1814885492 depended on by plus.assetsClass in the SWC D:\Adobe Flash Builder 4.7\as3Test\bin\as3Test.swc could not be found projectName line 0 Flex Problem"

Does anyone know why it is doing this or what is going on?

Upvotes: 0

Views: 397

Answers (1)

Justin
Justin

Reputation: 1299

So i figured out what i was doing wrong so what i was trying to do is build some Actionscript into a swc file for reuse in other project. In side the swc I had some as3 files that had some embed codes in them such as...

[Embed(source="Botton Arrow Down.png")] public static var buttonDown:Class;

Witch works when it is in a project but when you use the above code in a swc the spaced cause it to not be able to find the embeded file. After the swc is compiled. BUT this does not cause a compiler error in the swc it just causes a warning saying that it can't find the file on the project that you are using the swc in. To fix this just remove all of the spaces.

[Embed(source="Botton_Arrow_Down.png")] public static var buttonDown:Class;

With the spaces removed it work fine. I don't know about this but it is something to remember when using swc to hold embed assets. Hopefully someone will be able explain why.

Upvotes: 2

Related Questions