Draw the Play/Pause graphic : Controls « Graphics « Flash / Flex / ActionScript






Draw the Play/Pause graphic

 
package{
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.filters.DropShadowFilter;
    import flash.geom.Rectangle;
    import flash.media.SoundMixer;
    import flash.utils.ByteArray;
    
    public class Main extends Sprite {
        public function Main(  ) {
            // Draw the Play/Pause graphic
            graphics.beginFill(0xcccccc);
            graphics.drawRoundRect(0, 0, 20, 16, 4, 4);
            graphics.endFill(  );
            graphics.beginFill(0x333333);
            graphics.moveTo(4, 4);
            graphics.lineTo(8, 8);
            graphics.lineTo(4, 12);
            graphics.lineTo(4, 4);
            graphics.drawRect(10, 4, 2, 8);
            graphics.drawRect(14, 4, 2, 8);
            graphics.endFill(  );
            
        }
    }
}

        








Related examples in the same category

1.Volume Control
2.Panel Control
3.Creating an Item Renderer