# Flash drawing

**URL:** <https://forum.kirupa.com/t/flash-drawing/280947>\
**Category:** Uncategorized\
**Created:** [February 3, 2009, 8:45am UTC](https://forum.kirupa.com/t/flash-drawing/280947 "2009-02-03T08:45:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandraxx](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@sandraxx](https://forum.kirupa.com/u/sandraxx)\
**Post date:** [February 3, 2009, 8:45am UTC](https://forum.kirupa.com/t/flash-drawing/280947/1 "2009-02-03T08:45:26Z")

</div>

i have this code on first frame

```auto
stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); 
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler); 
stage.addEventListener(Event.RESIZE, resizeHandler); 
 
  
         function mouseUpHandler(param1:MouseEvent) : void 
        { 
            stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 
            return; 
        } 
     
 
        function mouseMoveHandler(param1:MouseEvent) : void 
        { 
            var _loc_2:Graphics; 
            _loc_2 = graphics; 
            _loc_2.lineStyle(10, 6710784); 
            _loc_2.lineTo(stage.mouseX, stage.mouseY); 
            return; 
        } 
 
         function mouseDownHandler(param1:MouseEvent) : void 
        { 
            var _loc_2:Graphics; 
            stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);            
            _loc_2 = graphics; 
            _loc_2.moveTo(stage.mouseX, stage.mouseY); 
            return; 
        } 
             function refreshUI() : void 
        { 
            clickToDraw_mc.x = stage.stageWidth / 2 - clickToDraw_mc.width / 2; 
            clickToDraw_mc.y = stage.stageHeight / 2 - clickToDraw_mc.height / 2; 
            return; 
        } 
           function resizeHandler(param1:Event) : void 
        { 
            refreshUI(); 
            return; 
        }

```

and this works perfecly…i can draw with mouse all over stage…but when i import image (handball field) and drag picture on stage i can only draw beneath this picture…my question how can i reference in AS3 code to draw on that imported picture…i wanna do something like whiteboard for coaches so they can draw actions for game…
