guppy24
03-04-2006, 07:32 PM
I have a component, that has actionscript in the main timeline (not in an external .as file). At the top of the code, I have this:
[IconFile("componentname.png")]
Then I have an icon saved out, 18x18, transparent, etc... with the same name in the same directory as the .fla file. The component and the PNG are named the exact same.
Then I save it out as the SWC, but the icon does not come up! I look in the SWC file, and there is the standard PNG in there. How do I replace that PNG to my custom one?
I tried both the 8 bit and the 24 alpha transparency, since I read in a previous blog that they made a mistake in the documentation. Neither worked though.
All the other code works fine, like the:
[Inspectable(defaultValue=5)]
var firstNumber:Number;
Why doesn't the icon code work?
Also, does this icon come up in the library and also in the property inspector over on the left? If it does, shouldn't the icon be bigger?
Any help appreciated!
[IconFile("componentname.png")]
Then I have an icon saved out, 18x18, transparent, etc... with the same name in the same directory as the .fla file. The component and the PNG are named the exact same.
Then I save it out as the SWC, but the icon does not come up! I look in the SWC file, and there is the standard PNG in there. How do I replace that PNG to my custom one?
I tried both the 8 bit and the 24 alpha transparency, since I read in a previous blog that they made a mistake in the documentation. Neither worked though.
All the other code works fine, like the:
[Inspectable(defaultValue=5)]
var firstNumber:Number;
Why doesn't the icon code work?
Also, does this icon come up in the library and also in the property inspector over on the left? If it does, shouldn't the icon be bigger?
Any help appreciated!