This is a little demo I made this morning as a way to get a viewport concept working for the latest game I am developing. I’ve done a few viewport type projects in other languages but had not implemented one in Flash AS3 yet.
This demo creates 300 random balls and sets them in motion inside the world. The world’s dimensions are four times larger than the viewport above.
You can click in the window above and use the arrow keys to move the viewport around the world. The source files for this tutorial are available at the end of the article.