This content has been marked as final. Show 5 replies
Are they gif or jpg images? What do you mean they are too big? Filesize or image size? Either way it makes sense to make them smaller (using image editing software - e.g. fireworks) even if you were to load them in separately at runtime.
I can't think of an easy way to do what you're asking.
-You can set the icon as a library symbol for each node in the tree.
-It would be easy enough to create a library item for the icon to load in external images after it is attached. But in order for this to work, each icon instance in the tree would need to be passed the image URL as a parameter at the attachMovie point inside the component and I can't see an easy way to do that.
-You have iconFunction and iconField properties inherited from the list class and setIcon method as part of the tree class. But I can't see a way to pass an initialisation object for the icon as it is attached in the tree, which is what you would need.
Perhaps I have missed something, but I think you might have to (resize them and) put them in the library, and used iconField or iconFunction (I don't know how/if iconField works with an xml dataprovider... I assume it checks an attribute of the node)
they are jpg images, to big i mean all together (238 files) - 125 k.
I know the is no easy way but there must be a way.
i tried to create a library item for the icon to load in external images after it is attached but i didn't find a way to send the url
haw about cellrendering ?
Maybe you could do that... but I would be inclined to do try to do it this way:
import all the images to the library
download and install this extension
then use it to rename all the symbols and set the linkage IDs. I think using that approach would be quicker. You would use either iconField or iconFunction to set the correct name of the flag. It does mean that the swf is larger and will contain flags that might not be used on occasion. If that's important then I guess your best option would be to work on the cellRenderer approach. I haven't played with it so can't advise how.
tks for your help
you're welcome, and others may know more about whether/how to do this with a custom cellrenderer