I think you are not able to access the skin from the host component. But if you use image cacher as singleton class and the skin add needed images in it, you will can access the images from anywhere. I have realized image cacher to load images from the server and use it for backgrounds and works good. I think this is your solution.
I read over that tutorial, and unless I'm mistaken, the section your recommended only has to do with the host class, and not the skin class. It doesn't actually provide access to the components directly. However, that said, it has sparked a few ideas on how it might be done, but will require experimentation. Nevertheless, I still haven't found the answer I am looking for.
I see that is the only way you can get access to the skin parts from the cmponents.. you need to do the following
- extend a spark button and override the methods show in the example link,
- and when a part is added, find out if it is the image,
- if so, store it in a instance variable of the custom button (say m_imgButton and public).
- Now you have to use this custom button at the actual buttons' place.
- To get the access to the button's image, you have to do buttonId.m_imgButton to get the image source.
or read the complete tutorial i've sent to you, that might help you understand in detail. There is no way to acccess skin parts from component. except by this kind of contract as mentioned in the example link