// Call the function and specify the name of the file. function loadMyPic (img) { var mc : MovieClip = this.createEmptyMovieClip ("imgcont_mc", this.getNextHighestDepth ()); mc._x = 0; mc._y = 0; var lg = 300, ht = 300; // Path of the file var image : String = "book/" + img; var mclListener : Object = new Object (); mclListener.onLoadProgress = function (targ : MovieClip, Loaded : Number, Total : Number) : Void { var num1 = Math.round ((Loaded / Total) * 100); // Return a loading percentage trace (num1); }; // Put anything you want after those events ... mclListener.onLoadStart = function (target_mc : MovieClip) { }; mclListener.onLoadComplete = function (target_mc : MovieClip) { }; mclListener.onLoadInit = function (target_mc : MovieClip) { }; var image_mcl : MovieClipLoader = new MovieClipLoader (); // image_mcl.addListener (mclListener); image_mcl.loadClip (image, imgcont_mc); }