# Attach Movie function problem

**URL:** <https://forum.kirupa.com/t/attach-movie-function-problem/306564>\
**Category:** flash\
**Created:** [March 17, 2010, 4:58pm UTC](https://forum.kirupa.com/t/attach-movie-function-problem/306564 "2010-03-17T16:58:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marwan\_aziz](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@marwan\_aziz](https://forum.kirupa.com/u/marwan_aziz)\
**Post date:** [March 17, 2010, 4:58pm UTC](https://forum.kirupa.com/t/attach-movie-function-problem/306564/1 "2010-03-17T16:58:53Z")

</div>

Hi I am very advanced when it comes to AS 3.0 but I have recently taken up a job to develop in AS2.0 and having a bit of a problem making it OOP. Okay here is the problem I have main.fla and TranslitePlaylist.as

[//main.fla](https://main.fla)

```auto
import TranslitePlaylist;

var obj:TranslitePlaylist;
obj = new TranslitePlaylist(2);

```

//TranslitePlaylist

```auto
class TranslitePlaylist extends MovieClip{
    var _numOfVids:Number;
    var _mcList:Array;

    public function TranslitePlaylist(numOfVids:Number){

        _numOfVids = numOfVids;
        _mcList = new Array(numOfVids);
        BuildList();
        trace("TranslitePlaylist created");
            
    }
    
    public function BuildList(){
        var pos:Number = 0;
        for(var i = 0;i<_numOfVids;i++){
            _mcList* = attachMovie("Video1","vid1"+i,1);
           trace(_mcList*);
        }
        
    }
    
}

```

couple of points

[LIST]  
[_]“Video1” is an element on the stage of main.fla and has the repective identifier name  
[_]the idea is when TranslitePlaylist is instantiated, I would like to see all the different Video1 MCs display on the stage of main  
[_]when tracing \_mcList_ I get undefined however when I change it to \_mcList\* = \_root.attachMovie(“Video1”,“vid1”+i,1); it does populate the array however that causes it to attach the movie to the stage.  
[/LIST]  
Any pointers would be much appreciated. Thank you
