Hello,

I have to pngs that I would like to merge into a new PNG, while maintaining the 
transparency.  I can get them to merge, but i can't keep the transparency

I am a newbie, not sure what I am missing

Here is my code

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute" 
backgroundColor="#393838">

    <mx:Script>
        <![CDATA[
       
       public function merge():void
       {
                var bitmap:BitmapData = new BitmapData(500, 500, true);
                bitmap.draw(mbs);
                bitmap.draw(gi);
                var image:Bitmap = new Bitmap(bitmap);
                target.source=image;
       }         
  
        ]]>
    </mx:Script>
    <mx:Canvas id="composite" x="10" y="10" width="557" height="386">
        <mx:Image id='mbs' x="24" y="70" source="mbs.png"/>
        <mx:Image id='gi' x="62" y="113" source="gi.png"/>
        <mx:Button x="482" y="354" label="Button" click="merge()"/>
        
    </mx:Canvas>
     <mx:Image id="target" x="10" y="404"/>
</mx:Application>


Reply via email to