views:

203

answers:

1

Hi there,

In my Flex application, using a custom control, I am making a JSON request to grab some data from the server. My rendering depends on this data such as knowing how many boxes to draw. How can I either force the rendering to wait until I've got the data before drawing to screen or have the boxes draw once we receive the data?

I have an event listener for Event.COMPLETE for my JSON request and in there, I call methods that add to the control. I've tried invalidateDisplayList but that doesn't seem to do anything for me?

A: 

How about adding a 'blank' state to your component that would be active until you have the final data. This state could say "loading" for example. Then you change state and render the proper layout