milidutta
11-28-2008, 07:14 AM
In Action Script 2:
I have 3 images named, img0,img1,img2 and loaded all three images and i have an empty moveclip named, template.
I have made 3 dupicate copy of the moveclip named, temp0,temp1,temp2.
After that i attached all the three images in the three dupicate moveclips.
Following is the code for that:
for (var i = 0; i<3; i++) {
bitmap_array[i] = BitmapData.loadBitmap("img"+i);
}
for (var k = 0; k<3; k++) {
_root.brd_mc.attachMovie("template","temp_"+k,200+k);
_root.brd_mc["temp_"+k].attachBitmap(bitmap_array[k],2);
}
How i will do the same thing in Action Script 3. Please provide me source code for this.
I have 3 images named, img0,img1,img2 and loaded all three images and i have an empty moveclip named, template.
I have made 3 dupicate copy of the moveclip named, temp0,temp1,temp2.
After that i attached all the three images in the three dupicate moveclips.
Following is the code for that:
for (var i = 0; i<3; i++) {
bitmap_array[i] = BitmapData.loadBitmap("img"+i);
}
for (var k = 0; k<3; k++) {
_root.brd_mc.attachMovie("template","temp_"+k,200+k);
_root.brd_mc["temp_"+k].attachBitmap(bitmap_array[k],2);
}
How i will do the same thing in Action Script 3. Please provide me source code for this.