
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Back to the Classroom
|
157
Back to the Classroom
It was great to get our hands dirty in this chapter. We really started to see how an
application (or at least part of an application) can be conceived and realized with
OOP. Now it’s time to return to some theory. In the next chapter, we’ll learn how to
set up an inheritance relationship, one kind of relationship between two or more
classes. Then we’ll get back to the hands-on stuff in Chapter 7.
* @param target A reference to the movie clip for which
* loading has finished.
*/
public function onLoadInit (target:MovieClip):Void {
// Remove the loading message
container_mc.loadStatus_txt.removeTextField( );
// Apply the mask to the loaded image
container_mc.image_mc.setMask(container_mc.mask_mc);
}
/**
* MovieClipLoader handler. Triggered by imageLoader when loading fails.
*
*
* @param target A reference to the movie clip for which
* loading failed.
* @param errorCode A string stating the cause of the load failure.
*/
public function onLoadError (target:MovieClip, errorCode:String):Void {
if (errorCode == "URLNotFound") {
container_mc.loadStatus_txt.text = "ERROR: File not found.";
} else if (errorCode == "LoadNeverCompleted") {
container_mc.loadStatus_txt.text = "ERROR: Load failed.";
} else {
// Catch-all to handle possible future ...