Using the Output panel
729
To use the trace statement in a script:
1.
Select Frame 1 of the Timeline, and add the following code in the Actions panel:
this.createEmptyMovieClip("img_mc", 10);
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
trace(ta" loaded in "+getTimer()+" ms");
};
mclListener.onLoadError = function(target_mc:MovieClip,
errorCode:String, httpStatus:Number) {
trace(">> error downloading image into "+target_mc);
trace(">>\t errorCode="+er", httpStatus="+httpStatus);
};
var img_mcl:MovieClipLoader = new MovieClipLoader();
img_mcl.addListener(mclListener);
img_mcl.loadClip("http://www.helpexamples.com/flash/images/404.jpg",
img_mc);
2.
Select Control > Test Movie to test the SWF file.
The Output panel displays the following message:
Updating Flash Player for testing
You can download the latest version of Flash Player from the Macromedia Support Center at
www.macromedia.com/support/flash
and use it to test your SWF files.
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...