Q:

How can I force Flex to load a particular element first?

I have a read-only accessor whose value depends on the width of an image. The width of this image determines all sorts of positional values defined in flex. It turns out that, when I load, the accessor returns 0 for a while, and then, about when the thing starts to accept input, it returns its proper value. 
Is there any way that I can force Flex to load the image first, thereby specifying its width? 

A:

why don't u load the image using Loader class, and loader class has load complete event, and then on load complete of image, do whtever u want,
var loader:Loader = nee Loader();

loader.load(new URLRequest('tree.png');
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,productLoadingComplete);   
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,productLoadingError);

private function productLoadingComplete(event:Event):void
{

}

