我有一个绑定到 ArrayCollection 的 mx:TileList。我有一些代码在修改 ArracyCollection 之前显示“正在加载...”消息,之后的一些代码隐藏了加载消息。
对于小型数据集,它工作正常。但是,我注意到数组大小约为 50~ 或更大,在 TileList 完成渲染新数据之前,flex 会隐藏我的加载消息,并且我会在奇数秒内留下空白屏幕。
在 TileList 完成重新渲染后,是否有我可以收听的事件?代码看起来像这样:
loading_message.visible = true;
for each (var x:Object in new_data) {
tile_list_data.append(x); // bound to my_tile_list component
}
my_tile_list.validateNow();
loading_message.visible = false;
在本例中,loading_message 出现、消失,然后 flex 应用程序将滞后,最终显示更新的 TileList。
有任何想法吗?谢谢!