Hi,
You need to create the instances dynamically, first you need a text file that should look a bit like this
&myVars=instance1,instance2,instance3,instance,... .......and so on- you get the idea, save the file and call it myText.txt
You can create a movie clip dynamically, but for this exercise, create your clip on stage, double click it and in frame 1 put
PHP Code:
trace(this._name)
delete it from the stage, open the library and give your clip a linkage identifier( right click - ckick on linkage), then try this code on frame 1 of the main timeline:
PHP Code:
myLVs = new LoadVars()
myLVs.load("myText.txt")
myLVs.onLoad = function(success)
{
if(success)
{
clipWidth = 20;/*this will place the ckips 2 pixels apart*/
myInstanceNames = new Array()
myInstanceNames = this.myVars.split(",")
for(i = 0; i < myInstanceNames.length; i++)
{
attachMovie("clip",myInstanceNames[i], i,{_y:50,_x:50+clipWidth *i})
}
}
}
/*where "clip" is the linkage identifier*/
Hope that helps
Vosgien