ActionScript can instruct a Flash program to load images such as photos and graphics created with graphic design and illustration programs. ActionScript can also be used to load videos so that that they to can be used for background effects. The Loader class of ActionScript methods and properties is used to load video files and graphic image files such as those from Adobe Photoshop. The display list in ActionScript is used to control how far in the background an image or video is placed. The ActionScript scale properties can also be used to scale images dynamically within videos.
You can also create scene backgrounds, such as simple background stage props like doors and walls, with ActionScript vector drawing commands. The ActionScript drawRect method lets you draw rectangles of any shape, and the beginFill method lets you color the rectangles any color you want. You can also texture the background with ActionScript filter properties.
ActionScript can be used to create animated background effects such as shooting stars, cars whizzing by on roads or rain clouds moving across the horizon. ActionScript lets you animate images you import or vector images you draw with other ActionScript commands. You can also animate photograph bitmaps that you import with ActionScript. Bitmap commands in ActionScript will let you set and change the color of each pixel in an image as the movie plays. Create dazzling sunrise and sunset backgrounds quickly with ActionScript's tint matrices and properties.
Buttons and other controls can be created with ActionScript to let you select different backgrounds before or when the Flash movie plays. ActionScript event listeners detect when a button or key is pressed on your keyboard. Buttons can be programmed with keyboard event listeners individually to load specific background images and videos. They can also completely redraw different background images.
ActionScript masking effects are the basis for many types of graphic, photographic, animated and video background effects. Masks are often used with ActionScript filters to create multicolored and blurred trailing effects for background scenes such as highway traffic and shooting stars. The masking effects also can be used for backgrounds in Flash space war games and car racing games.