This content has been marked as final. Show 4 replies
Add a listener using the enterFrame event. Remove the listener after it has been called once.
Thanks - works a treat.
Sorry, correction - had some remaining artefacts of my timer hack that made it look like it was working. This still doesn't work. The event gets fired and it does all the work, but it delays updating the display until it's finished.
That's right. Maybe I misunderstood the timing you wanted this to execute. But if you add a listener to EnterFrame, then the component will display for one frame before correcting itself. Usually, you can catch this with the naked eye, especially since frame rate slows down during heavy processing.
Maybe I should have gone to the fundamentals first and asked if you are trying the invalidation methods?
unfortunately, I think you may end up getting slower and slower performance if you are iterating content and calling the above each time--even though they techinically should update once per frame despite the amount of times you call them. So maybe we should take another step back to something even more fundamental:
One more thing you might try is looking into creationPolicy. With creationPolicy you can set a container component to draw its children one by one instead of waiting until all of them are finished before displaying them. The default value is "all" which means you don't see the entire component until all its children are instantiated. Does this sound like what you are trying to do?
Hope that helps, and I am sorry if I misunderstood your question.