Programatically load images in Flex -


I have to load bitmap or bitmap data objects to several images. Images are hosted outside the Flex project, and they are referred to by the external configuration file, so I can not embed them. Since the images are not being displayed directly to the user (they are being added to a PDF that are generated for download), grouping the image objects, applying them in the app, and their loads of handlers to fire. It seems to be unable to wait.

What is the best way to load these pictures in an application?

Have you considered using the loader class?

  var ldr: loader = new loader (); Ldr.contentLoaderInfo.addEventListener (event.complete, onload); Ldr.load (new URLRequest ("image.png")); Function Onload (E: Event): Zero {var Image: Bitmap = Bitmap (LoaderInfo (e.target).); Var bmpData: bitmapdata = image.bitmapData; // Use bmpdata the way you want to trace (bmpdata.width); Trace (bmpdata.height); }  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -