Scale an Image with Embed setting : Image Scale « Graphics « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Graphics » Image ScaleScreenshots 
Scale an Image with Embed setting
Scale an Image with Embed setting
           


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
    
    
     <mx:Script>
        
            [Embed(source="logo.png", scaleGridTop="5", scaleGridBottom="10", scaleGridLeft="5", scaleGridRight="10")]
            [Bindable]
            public var imgCls:Class;
      
    </mx:Script>
    
    <mx:Label text="Original Image" />
    <mx:Image source="@Embed('logo.png')" />

    
    <mx:Spacer height="10" />
    <mx:Label text="Scale9-Scaled Image" />
    <mx:Image source="{imgCls}" width="100" height="100"/>
    
</mx:Application>

   
    
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Scale an image by setting its width and heightScale an image by setting its width and height
2.BitMap ScalingBitMap Scaling
3.Using postLayoutTransformOffsets property to modify the position and scale of a component.Using postLayoutTransformOffsets property to modify the position and scale of a component.
4.Using 9-slice scaling to maintain a set border, regardless of how the image itself is resized.
w__w_w_.j__a__v___a_2_s_.___co__m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.