1 Reply Latest reply on Oct 24, 2008 1:13 PM by -Hob

    displaying base64 encoded image from an array

      I am quiet new to flex and need some help in displaying the base64 encoded images contained in an array in a horizontal scroll list.


      I have an array which contains base64 encoded strings(images).I want to display it in a horizontal scroll with some image highlighting that is when i move the cursor on to the displayed images.

      Can anyone help me in this regard.
        • 1. Re: displaying base64 encoded image from an array
          -Hob Level 1
          You'll have to do something like this:

          var decoder:Base64Decoder = new Base64Decoder();
          var bytes:ByteArray = decoder.toByteArray();

          var bmpData:BitmapData = new BitmapData();
          bmpData.setPixels(dimensions, bytes); //Note dimensions is a rectangle that specifies the dimensions of your bitmap. not sure how you'd figure that out.

          var bitmap:Bitmap = new Bitmap(bmpData);

          Now you have a bitmap that you can work with like any other DisplayObject.