# OOp help

**URL:** <https://forum.kirupa.com/t/oop-help/324872>\
**Category:** flash\
**Created:** [September 12, 2011, 9:28pm UTC](https://forum.kirupa.com/t/oop-help/324872 "2011-09-12T21:28:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [September 12, 2011, 9:28pm UTC](https://forum.kirupa.com/t/oop-help/324872/1 "2011-09-12T21:28:20Z")

</div>

Hiya… Im trying out some basic OOP… and cannot understand where I am going wrong. It works within the timeline - but when I transfer to Packages It doesnt work where concerning the property of the bitmap.  
I have a ‘MyClip’ instance in the library.  
here is my bask Document Class package::

```auto
package {
    import flash.display.*;
    import flash.events.*;
    
    public class MyMain extends MovieClip
    {
        public var pic:MyClip = new MyClip();
        
        public function MyMain():void
        {    
            Render();
        }    
        
         public function Render()
        {    
            this['bmp'] = new BitmapData(stage.stageWidth,stage.stageHeight,true,0x000000);
            this['bmp'].draw( pic );                
            this['item'] = new Bitmap( this['bmp'] );
             
            this.addChild( this['item'] );    
        }
    }
}

```

the this[‘bmp’] is to be used with this[‘bmp’+i] to make multiple instances within a loop … and Ive seen that method used before. IF I take out the this[‘bmp’] and replace with var bmp = new… etc - then it works. Hmm  
can anyone guide me home?  
Thanks!
