Create shape and draw with graphics : Shape « Graphics « Flex






Create shape and draw with graphics

Create shape and draw with graphics
          
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        
        import mx.effects.*;
        public function createLargeMask(targ:Object,bounds:Rectangle):Shape {
            var largeMask:Shape = new Shape();
            largeMask.graphics.beginFill(0x00FFFF, 0.5);
            largeMask.graphics.drawRoundRect(0, 0, bounds.width + 10,bounds.height - 10, 3);
            largeMask.graphics.endFill();
            return largeMask;
        }
      
    </mx:Script>
    <mx:WipeLeft id="customWL" createMaskFunction="createLargeMask" showTarget="false" />
    <mx:HBox borderStyle="solid" paddingLeft="10" paddingRight="10" paddingTop="10" paddingBottom="10">
        <mx:Button label="Play" mouseDownEffect="{customWL}" height="100" width="100" />
    </mx:HBox>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category