Hey all,
I must be missing something straight-forward here...
I'm loading a PNG file with a transparent background, and then I want
to extract the Bitmap, preserving its transparency. The loaded clip
shows up with the transparent background, but after the .draw(), the
bitmap seems to lose its transparency. (the trace statement, of
course, shows the .transparent property to be true)
Can anyone spot the error?
Thanks,
--Dave
loaderObj.onLoadInit = function( target_mc:MovieClip ) {
// tried with and without setting fillColor
var m_cBitmap = new BitmapData( target_mc._width, target_mc._height,
true, 0xFF990000 );
// tried with and without setting pMatrix, pColorTransform, and
various blendModes
var pMatrix = new Matrix();
var pColorTransform = new ColorTransform();
m_cBitmap.draw( target_mc, pMatrix, pColorTransform, "normal" );
var bitmap_mc = _root.createEmptyMovieClip( "transparency_test",
_root.getNextHighestDepth() );
bitmap_mc.attachBitmap(m_cBitmap, 2, "auto", true);
trace("onLoadInit: transparency="+m_cBitmap.transparent);
};
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com