# Drawing to Graphics in a MovieClip

**URL:** <https://forum.kirupa.com/t/drawing-to-graphics-in-a-movieclip/322519>\
**Category:** flash\
**Created:** [May 24, 2011, 8:00am UTC](https://forum.kirupa.com/t/drawing-to-graphics-in-a-movieclip/322519 "2011-05-24T08:00:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![s1ni5t3r](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@s1ni5t3r](https://forum.kirupa.com/u/s1ni5t3r)\
**Post date:** [May 24, 2011, 8:00am UTC](https://forum.kirupa.com/t/drawing-to-graphics-in-a-movieclip/322519/1 "2011-05-24T08:00:34Z")

</div>

The code below is supposed to display a bitmapData on the stage for debugging purposes but just doesn’t seem to display anything. I added the ellipse section to check but that doesn’t draw anything either.

I’m a total noob so there’s probably something obvious I’m missing.

```auto
    import flash.display.MovieClip;
    import flash.display.BitmapData;
    import flash.display.Stage;
    import flash.events.Event;
    
    public class BitmapShowMC extends MovieClip
    {
        
        public function MovieClip()
        {
        }

    
        public function setup(bitmapData:BitmapData,st:Stage)
        {
            x=200; y=20;
            width=70; height=30;

            graphics.beginFill(0x777777);
            graphics.drawEllipse(35,10,70,20);
            graphics.endFill();

            graphics.beginBitmapFill(bitmapData);
            graphics.drawRect(0,0,70,30);
            graphics.endFill();
            
            st.addChild(this);
            st.addEventListener(Event.ENTER_FRAME,movement);

            trace("BitmapShow");
        }
        
        private function movement(e:Event)
        {
            y+=1;
        }
    }

```
