I'm working on a thumbnail gallery, populated by XML. I've
included the code loading the XML into Flash, and the function that
populates my MC called 'picture' with the first image in XML.
But I end up tracing "0" for width of my picture MC....Why is
this not updating to the width of the picture? I need to center
this clip dynamically for each picture, and I don't know how to do
this unless I can use the width of the picture...which clearly I
Your width is tracing 0 because you are getting it before the
complete - it is an asynchronous operation, so you can't get
the width until
it is done. The way to know it's done is to not use loadMovie
- use the
MovieClipLoader class instead, and use its onLoadInit method
to get / set
loaded clip properties.