I'm building an application with flash as3.0. This my code.
function onCompleteLoadTimeline(event:Event){
var result:Object = JSON.parse(event.target.data);
var yPos = 0;
for (var i:int=0;i<=2;i++){
tpostArr[i] = new t_post();
var batas_mc:batas = new batas();
tpostArr[i].foto.x = 52.50;
tpostArr[i].foto.y = 52.50;
tpostArr[i].nama.x = 120;
tpostArr[i].nama.y = 20;
tpostArr[i].postingan.x = 120;
tpostArr[i].postingan.y = 55.15;
tpostArr[i].postingan.wordWrap = true;
tpostArr[i].postingan.autoSize = TextFieldAutoSize.LEFT;
tpostArr[i].tombol_suka.x = 440;
tpostArr[i].tombol_suka.y = 73;
tpostArr[i].nama.text = result[i].timeline_name;
tpostArr[i].postingan.text = result[i].timeline_post;
batas_mc.x = 0;
batas_mc.y = tpostArr[i].postingan.y + tpostArr[i].postingan.height + 20;
tpostArr[i].addChild(batas_mc);
timeline_mc.addChild(tpostArr[i]);
tpostArr[i].y = i* tpostArr[i].height;
}
}
about the y position of the tpost. height of the tpost is not always the same. tpost can be higher depending on the tpostArr[i].postingan.height and I want tpost not overlap. Can it be solved by enterFrame? if can can you show the code for me?