Global Functions
101
showRedrawRegions function
showRedrawRegions(enable:Boolean, [color:Number]) : Void
Provides the ability for the debugger player to outline the regions of the screen that are being
redrawn (that is, dirty regions that are being updated). The outlines can also be turned on
with the Show Redraw Regions menu option.
Availability:
ActionScript 1.0; Flash Player 8
Parameters
enable
:Boolean
- Specifies whether to enable (
true
) or disable (
false
) redraw regions.
When set to
true
, the redraw rectangles are shown. When set to
false
, the redraw rectangles
are cleared.
color
:Number
[optional] - The color to draw with. The default is red: 0xFF0000.
Example
The following example demonstrates the
showRedrawRegions
function.
var w:Number = 100;
var h:Number = 100;
var shape1:MovieClip = createShape("shape1");
shape1.onEnterFrame = function():Void {
this._x += 5;
this._y += 5;
}
var shape2:MovieClip = createShape("shape2");
shape2.onEnterFrame = function():Void {
this._y += 5;
}
_global.showRedrawRegions(true);
function createShape(name:String):MovieClip {
var mc:MovieClip = this.createEmptyMovieClip(name,
this.getNextHighestDepth());
mc.beginFill(0xFFCC00);
mc.moveTo(200, 200);
mc.curveTo(300, 200, 300, 100);
mc.curveTo(300, 0, 200, 0);
mc.curveTo(100, 0, 100, 100);
mc.curveTo(100, 200, 200, 200);
mc.endFill();
return mc;
}
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...