Use Blend Modes with Multiple Images : Image Blend « Graphics « Flex






Use Blend Modes with Multiple Images

Use Blend Modes with Multiple Images
           

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="800" height="800">
    <mx:Script>
        
            import flash.display.BlendMode;
      
    </mx:Script>
    <mx:Image id="img1" source="a.jpg"/>
    <mx:Image id="img2" source="a.jpg"/>
    <mx:HBox>
        <mx:CheckBox id="chb" label="which one"/>
        <mx:ComboBox id="cb" dataProvider="{[BlendMode.ADD, BlendMode.ALPHA, BlendMode.DARKEN]}"
         change="chb.selected ? img1.blendMode = cb.selectedItem as String : img2.blendMode = cb.selectedItem as String"/>
    </mx:HBox>
</mx:Canvas>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.BlendMode.DIFFERENCE, BlendMode.ERASE, BlendMode.HARDLIGHT, BlendMode.INVERTBlendMode.DIFFERENCE, BlendMode.ERASE, BlendMode.HARDLIGHT, BlendMode.INVERT
2.BlendMode.LAYER, BlendMode.LIGHTEN, BlendMode.MULTIPLY, BlendMode.NORMALBlendMode.LAYER, BlendMode.LIGHTEN, BlendMode.MULTIPLY, BlendMode.NORMAL
3.BlendMode.OVERLAY, BlendMode.SCREEN, BlendMode.SUBTRACTBlendMode.OVERLAY, BlendMode.SCREEN, BlendMode.SUBTRACT
4.Blend ModesBlend Modes