From the course: Learning ActionScript

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Loader, Bitmap, and BitmapData

Loader, Bitmap, and BitmapData - ActionScript Tutorial

From the course: Learning ActionScript

Start my 1-month free trial

Loader, Bitmap, and BitmapData

This lesson will examine the relationship between the Loader, Bitmap, and Bitmap Data classes. When importing external image data, through ActionScript. So that we can see our package here, our class within, Flash Builder. And we've got a number of things going on here. We're importing flash.display.loader to actually load in an external Bitmap image. We're importing flash.display.sprite simply because we are extended sprite to this class. We import flash.events.event to monitor our load progress or load completion. We import flash.events.progress event to explicitly monitor the progress of any loaded image. Flash.net.url request to make a url request upon the image file itself and load it into our application. Then we also are using flash.system.decoding policy, as well as flash.system.loadercontext. In order to specify how this actual image is decoded upon load, this is something new within Flash Player 11. So, to set this up we first create a private constant called image_file, set…

Contents