you can't force screen update.  maybe your seeing results of
invalidation/validation?
 
try validatenow() and/or calllater

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of clash_y
Sent: Friday, September 28, 2007 12:25 AM
To: [email protected]
Subject: [flexcoders] Adding and removing display objects in the same
frame



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? 



 

Reply via email to