# Getting around \_parent

**URL:** <https://forum.kirupa.com/t/getting-around--parent/229578>\
**Category:** Uncategorized\
**Created:** [June 18, 2007, 6:48pm UTC](https://forum.kirupa.com/t/getting-around--parent/229578 "2007-06-18T18:48:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paradox](https://avatars.discourse-cdn.com/v4/letter/p/958977/32.png) [@paradox](https://forum.kirupa.com/u/paradox)\
**Post date:** [June 18, 2007, 6:48pm UTC](https://forum.kirupa.com/t/getting-around--parent/229578/1 "2007-06-18T18:48:13Z")

</div>

so i am learning AS3.0 but lack of global stuff is giving me headache.

I have a bitmapdata that is part of the main class (the one that is the flash movie) and i want a subclass to draw to it.

```auto
package{
    import grassBlade;

    public class grass extends Sprite{
   
        private var canvas:BitmapData;
     
        public function grass(){
            canvas = new BitmapData(stage.stageWidth,stage.stageHeight,true,0x00000000);
            var bmp:Bitmap = new Bitmap(canvas);
            addChild(bmp);
          ....

blades*=new grassBlade(col,amp,lenght,period);
....
        }
        ...
}}

```

and the other class glassBlade

```auto
package {
    
    class grassBlade extends Sprite{
        ....
        public function grassBlade(c:uint,a:Number,l:Number,p:Number)
        {
        ...
        
        private function onTimer(e:TimerEvent):void{
            var circle:Sprite = new Sprite();
           .....
            (..... some how i want to draw circle into canvas via canvas.draw(circle))
        }
}

```
