The question: How do you prevent flash from re-rendering the frame
while you're making changes to the ui layout?
The problem: I'm removing a ui component and adding a new one. I don't
want there to be any frames rendered between the two calls. In other
words, on frame x the first ui component should be visible. On frame
x+1 that ui component should be hidden and the new component should be
visible. The behavior im seeing is more like frame x+2 or x+3, so
there is a visual "pop"
The goal: I want to remove a component from a display list and add a
new one without any popping. Ideally it'd be something like...
function swapUIComponents(newComp:UIComponent, oldComp:UIComponent,
displayList:DisplayObjectContainer) : void
{
mx.core.Application.application.updateDisplayBuffer(false);
var oldIndex:int = displayList.getChildIndex(oldComp);
displayList.removeChild(oldComp);
displayList.addChildAt(newComp, oldIndex);
mx.core.Application.application.updateDisplayBuffer(true);
}
Anyone have any thoughts on this?