1 Reply Latest reply on Feb 13, 2009 10:34 AM by Joe ... Ward

    Load image on NativeWindow

      Anyone knows how to load array of images onto a NativeWindow? Please advice me. Thanks!
        • 1. Re: Load image on NativeWindow
          Joe ... Ward Level 4
          There's more than one way to do it. Essentially, you need to create a display object containing each image and then add that object to the display list.

          For example, if your array contained BitmapData objects representing the images, you could do something like this:

          // myWin is the NativeWindow object
          var bmp:Bitmap = new Bitmap( imageArray[ index ]);
          myWin.stage.addChild( bmp );

          This will stack all the images on top of each other, so you will have to set the x and y properties.

          If the image array contains file paths or URLs, you will need to use the Loader class to load the images.

          (Note that the Flex framework is very good at handling this sort of layout in a fluid and flexible manner.)