Flex is a way to transmit an event after loading an MX: Image? I am loading the image externally and do not know the width / height until it loads. I get an exception when I call width / height in the image before loading.
You should use the loader, in this case, as I have used in the code mentioned below < / P>
Private Worker Loader: Loader = New Loader (); Loader.load (new URLRequest (rp_product.dataProvider [i]. Source @)); Loader.contentLoaderInfo.addEventListener (event.complete, loading the product);
loader.contentLoaderInfo.addEventListener (IOErrorEvent.IO_ERROR, Productloading error);
rp_product.dataProvider [i]. @ Source, here rp_product is my repeater's ID,
You just give the image source here that you want to load, now you have the product loading complete () method and the product loading error ( ) Methods are available, even if you want to do something on the image progress, use this code:
loader.contentLoaderInfo.addEventListener (progress event.progress, on imageloading progress);
In this way, you can load an external image, I hope this is what is looking for you
Comments
Post a Comment