My account
Shopping cart
Knowledge base
Support

Knowledge Base

Important! All new questions are usually answered within the next business day.

Loader Pro V3

(views: 20089)

The Loader Pro V3 is a professional loader that features scale modes (scale, crop, scale-crop, resize), align modes, built in preloaders and customized transition tweens. Here are all known issues for Loader Pro V3. If you have any questions that you think we should discuss here please let us know.



Smoothing for transparent PNGs

(2009-02-05 - views: 12117)
Q: It seems that when the imageSmoothing property is true, the transparent PNG images are smooth but they are no longer transparent - they have a white background. How can this be solved ?
A: The white background appears because the loader makes a BitmapData snapshot of the content which adds that white background. The workaround for this is to set the smoothing to true on the content retrieved as Bitmap object. Here is the code snippet for that (make sure that imageSmoothing is set to false for transparent PNGs):

// You need to wait until the content is completely loaded to have access
// to it. For this, use the LoaderEvents.LOAD event.
//
// Note: make sure that for transparent PNG files, the imageSmoothing property
// of the component is set to false.
import com.jumpeye.Events.LoaderEvents;

ldr.addEventListener(LoaderEvents.LOAD, loadComplete);

// The content has completely loaded so you can access it and use it as
// a Bitmap object to turn on smoothing for the transparent PNG images.
function loadComplete(evt:LoaderEvents):void {
    var bmp:Bitmap = evt.target.content.contentLoaderInfo.content as Bitmap;
    bmp.smoothing = true;
}


Back