How to repaint the display in ActionScript 3
Can anybody say to me how to refresh the display in ActionSc开发者_StackOverflow社区ript e?
The correspondent from Java:
pane.repaint();
The DisplayObject system of Flash/Flex is a "retained" or "stateful" system. This means that if you add MovieClips or other DisplayObjects onto the stage, they will stay there in whatever position until you deliberately change or remove them.
This is the opposite of a system like what DirectX or OpenGL have where you have to purposefully redraw every frame, even if nothing has changed, to keep objects alive.
If you want to "update the display" in Flash then this will vary depending on whatever it is you did to put the display items on the screen in the first place. You might need to erase or add some, move them about, change the frame they're on.
If you have correctly moved or changed items on the screen, the screen will automatically update to indicate this. There is no need for a repaint
call as with Java.
I'm sorry for the vague answer, but you are the architect here. Whatever it was you did before, you need to do it again. :p
精彩评论