Hello there.
For my current project, I need to set skins by loading external images with a
class which extends the BitmapAsset class. Actually I based my work on Ben
Stucki's IconUtility class which I modify a little to manage different skins.
My components are dynamically created and I set the style like this:
blablaInstance.setStyle("skin", IconUtility.getClass(blablaInstance, "skin",
"http://www.exampledomain.com/image.jpg")
The arguments and the loader instance are saved in a dictionary and the
getClass returns class definition. So when the skin is instanced by the
component, I can find all info I need to load the image and change the
bitmapData.
My method works well with Buttons, because the name attribute does its job and
indicate which skin is currently loaded.
But when I try to do it with a progressbar or a slider, for instance:
dummySlider.setStyle("thumbSkin", IconUtility.getClass(dummySlider,
"thumbSkin", "http://www.exampledomain.com/image.jpg")
When I do that, the name attribute doesn't indicate the current skin, but some
fancy string like "IconUtility114".
I don't know where the name attribute is set in the sdk source code, but if you
understand why it happens and how to correct it, I will be very grateful. And
if you have any clues or ideas, don't hesitate to post.