actionscript 3 - How to addChild to a movie clip a movie clip that as bitmap in it -
i trying create list in runtime couldn't make work.
here code :
var mc:movieclip = new movieclip(); addchild(mc); grplist.source = mc; for(var = 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 = * 100; mvc.addchild(img); mc.addchild(mvc); grpitemlist.update(); }
i have scroll pane , inside of have movie clip. in movie clip want list new movie clips has bitmaps in it. when try without new movie clip adding image directly, works charm. doing wrong ?
i think,the problem asigning dimensions before movieclip has content. further dont need set dimensions dimensions of child. mvc gets height , width of attached image automatically. greetings.
Comments
Post a Comment