1 Reply Latest reply on Apr 16, 2009 5:12 AM by Inderjit

    Smoothing external images

    Carlos Eduardo Garza
      how to load images before creating the image class for enable smoothing?
      In this examples the image is embeded. but i need to load the image from {data.image}


      The first approach uses the BitmapAsset class, where init() is called on creationComplete as follows:

      import mx.core.BitmapAsset;

      public var mySmoothImage:BitmapAsset;

      public var myImage:Class;

      public function init():void
      smoothImage = BitmapAsset(new myImage());
      smoothImage.smoothing = true;

      The second approach is somewhat more compact, and uses a class level embed that extends Bitmap, as follows:

      public class smoothImage extends Bitmap
      public function smoothImage()
      smoothing = true;