Graphics Flex



    
        
        import mx.managers.DragManager;
        import mx.core.DragSource;
        
        import flash.events.MouseEvent;
        import mx.controls.Image;
        public var imgCopy:Class;
        [Embed(source='a.png')]
        public var imgDrag:Class;
        
        public function initiateDrag(event:MouseEvent):void
        {
            var dragInitiator:Button=Button(event.currentTarget);
            var ds:DragSource = new DragSource();
            var dragImage:Image = new Image();
            var xOffset:int = -2;
            var yOffset:int = -2;
            var alphaLevel:Number = 0.5;
            dragImage.source = imgDrag;
            dragImage.height=100;
            dragImage.width=100;
            DragManager.doDrag(dragInitiator, ds, event,
            dragImage,xOffset,yOffset,alphaLevel);
        }