Simple FullBrowser Class in ActionScript 2.0
You know those code snippets you use every few months or so, and you have to re-teach yourself how to use it every time? I had the same problem recently with full browser Flash apps, especially in Zinc. I needed to create an application that maintained a constant background, even if the window was resized to whatever the resolution could be. We've all learned how to do it, it was just one of those things that I got sick of relearning every time.I wrote a simple class to handle a few different types of full screen/browser applications called FullBrowser. To use it, you initialize the class, pass in the reference to the stage and whatever content you want centered, and then call the setFill method, which allows you to pass either "Solid" (followed by a color [ex: "0x335599"]), "Gradient" (followed by two colors [ex: "0x000000", "0x220033"]), or "Bitmap" (followed by the linkage id to the bitmap in the library).
Go ahead and use it if you'd like. Any comments or feedback are appreciated!
Also, the zip includes an example .fla and the filed background was taken from Squidfingers.
Labels: ActionScript 2.0, Classes

