Friday, October 26, 2007

A filed weird behaviour - The component doesn't render correctly after adding to Stage

Apart from sharing Flex Programming experience, this blog also serve as a record or notes for some weird scenerios...

There were once I working on a slide show project. Basically a container is moving along the y-axis and thumbnails are adding dynimatically to the container. But somehow the thumbnails are not rendered on screen. The codes are executed as I debug'd them and does show the lines.

The thumbnails show up if I stopped the moving container. This is weird to me.

Finally, I found a dirty solution, i.e. add the thumbnails container to rawChildren.

It seems the issue is related to the render sequence of rendering...
e.g. Initialize component -> set properties -> updateDisplayList -> commitProperties and so on...

No comments: