PDA

View Full Version : Custom Component Icon



voxecho
January 13th, 2006, 10:32 AM
hmmm, i followed the instructions for adding an icon

http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00003112.html (http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00003112.html)

but the default component icon didn't change in the components panel, or the FLA library, or in any FLA library that i add the component to (after updating, of coarse)

the only way i am able to get the component icon to change in the "Home" library is with the FCustomIcons on the same library level as the component... that changes the icon in the library, but no where else.

What am I missing here?


• 8 bit transparent png
• 18x18 dementions
• upper left pixil transparent
• in same directory as the FLA file ControlStrip.png
• line before class definition [IconFile("ControlStrip.png")]
• Control->Enter
• Built SWC
• NOTHING!

Any help would be great.

TIA
Echo

mpelland
January 13th, 2006, 10:41 AM
hmmm thats weird... it changes in the library but won't compile with it? i haven't really had that issue.. I went straight through their tutorial.. i think my icon was a PNG 16x16... i noticed that the dimensions of it really seem to matter.. i have read 20 x 20 and 16 x 16, not sure with is right but you might want to try.

voxecho
January 13th, 2006, 11:10 AM
actually, the only reason that it changes inside the library is because i am still importing it into the movie and putting it in the FCustomIcons folder. I've even tried putting the imported image INSIDE the movieclip (like you would do dependent items in a hidden frame so they are exported with the component) and that didn't help.

will try changing the dementions

voxecho
January 13th, 2006, 11:22 AM
no luck. still not changing (I removed the FCustomIcon folder and now it's not changing in the library OR the components panel)

tried 16x16, 18x18, 20x20 nothing. would be alot easier if they let you define it in the components definition CP :\

mpelland
January 13th, 2006, 11:30 AM
ok, try putting the image (16 x 16) in the same folder as both the AS and the FLA files.

voxecho
January 13th, 2006, 11:39 AM
Yes, the png file is in the same folder as the .as (class) file though this is not the same folder as the fla files... this shouldn't be an issue (as my classfiles are all in my class root folder) it hasn't helped though :(

-Echo


ok, try putting the image (16 x 16) in the same folder as both the AS and the FLA files.

joene
January 13th, 2006, 11:46 AM
Yes, the png file is in the same folder as the .as (class) file though this is not the same folder as the fla files... this shouldn't be an issue (as my classfiles are all in my class root folder) it hasn't helped though :(

-Echo



Add the image to the same directory as the FLA file. When you export the SWC file, Flash includes the image at the root level of the archive.


If it's not in de same folder als your fla, I guess you should change the path to your png file.

voxecho
January 13th, 2006, 11:55 AM
Holy Hell, did i mess that one up :p

thanks, your right, it should be in the same folder with the .FLA not the .AS... i must have read that line a dozen times and still got it wrong :\

Thanks all for the help :D


If it's not in de same folder als your fla, I guess you should change the path to your png file.

mpelland
January 13th, 2006, 12:12 PM
well glad to be of service

voxecho
January 13th, 2006, 12:21 PM
by the way... as it turns out. size DOESN'T matter. it will automatically resize the image...

joene
January 13th, 2006, 12:36 PM
by the way... as it turns out. size DOESN'T matter. it will automatically resize the image...

no problem :) I thought it had to be 16x16 though