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
import TranslitePlaylist;
var obj:TranslitePlaylist;
obj = new TranslitePlaylist(2);
//TranslitePlaylist
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