dimanche 31 mai 2015

How to addChild to a movie clip a movie clip that as bitmap in it

i am trying to create a list in runtime but couldn't make it work.

Here is my code :

var mc:MovieClip = new MovieClip();
grpList.source = mc;
for(var i = 0;i<count;i++){
    var img:Bitmap = new Bitmap(new listbitmap(0,0));
    var mvc:MovieClip = new MovieClip();
    mvc.height = img.height;
    mvc.width = img.width;
    mvc.x = 0;
    mvc.y = i * 100;

I have a scroll pane and inside of it i have a movie clip. In that movie clip i want to list new movie clips that has bitmaps in it. When i try to do it without a new movie clip but adding the image directly, it works like a charm. What am i doing wrong ?

Aucun commentaire:

Enregistrer un commentaire