﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="book" content="ActionScript&nbsp;3.0&nbsp;Language&nbsp;and&nbsp;Components&nbsp;Reference"><link rel="stylesheet" href="../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../override.css" type="text/css"><meta name="keywords" content="BitmapData,flash.display.BitmapData,ACTIONSCRIPT2,ACTIONSCRIPT3,ADD,ALPHA,ALPHA,ALWAYS,AUTO,BEST,BEVEL,BLUE,BOOL2,BOOL3,BOOL4,BOOL,BOTTOM,BOTTOM,BOTTOM,BOTTOM_LEFT,BOTTOM_LEFT,BOTTOM_RIGHT,BOTTOM_RIGHT,CURVE_TO,DARKEN,DEFAULT,DEFAULT_OFF,DEFAULT_ON,DIFFERENCE,ERASE,EVEN_ODD,EXACT_FIT,FAST,FLASH10,FLASH1,FLASH2,FLASH3,FLASH4,FLASH5,FLASH6,FLASH7,FLASH8,FLASH9,FLOAT2,FLOAT3,FLOAT4,FLOAT,FULL,FULL_SCREEN,FULL_SCREEN_INTERACTIVE,GREEN,HARDLIGHT,HIGH,HORIZONTAL,INT2,INT3,INT4,INT,INVERT,LAYER,LEFT,LEFT,LIGHTEN,LIGHTWEIGHT,LINEAR,LINEAR_RGB,LINE_TO,LOW,MATRIX2X2,MATRIX3X3,MATRIX4X4,MAXIMIZED,MEDIUM,MINIMIZED,MITER,MOVE_TO,MULTIPLY,NEGATIVE,NEVER,NONE,NONE,NONE,NONE,NONE,NONE,NON_ZERO,NORMAL,NORMAL,NORMAL,NORMAL,NORMAL,NO_BORDER,NO_OP,NO_SCALE,OFF,ON,OVERLAY,PAD,POSITIVE,RADIAL,RED,REFLECT,REPEAT,RGB,RIGHT,RIGHT,ROUND,ROUND,SCREEN,SHADER,SHOW_ALL,SQUARE,STANDARD,SUBTRACT,TOP,TOP,TOP,TOP_LEFT,TOP_LEFT,TOP_RIGHT,TOP_RIGHT,UNSUPPORTED,UTILITY,VERTICAL,WIDE_LINE_TO,WIDE_MOVE_TO,accessibilityProperties,actionScriptVersion,active,align,alpha,alpha,alphas,alwaysInFront,applicationDomain,bitmapData,bitmapData,blendMode,blendShader,bounds,bounds,buttonMode,byteCode,bytesLoaded,bytes,bytesTotal,cacheAsBitmap,caps,channels,checked,childAllowsParent,childSandboxBridge,closed,colorCorrection,colorCorrectionSupport,colorDepth,color,colors,commands,content,contentLoaderInfo,content,contentType,contextMenu,culling,currentFrameLabel,currentFrame,currentLabel,currentLabels,currentScene,data,data,data,displayState,displayState,doubleClickEnabled,downState,dropTarget,enabled,enabled,enabled,fill,filters,focalPointRatio,focusRect,focus,frameRate,frameRate,frame,framesLoaded,fullScreenHeight,fullScreenSourceRect,fullScreenWidth,graphics,graphics,height,height,height,height,height,height,height,hitArea,hitTestState,index,index,indices,input,interpolationMethod,isSeparator,items,joints,keyEquivalentModifiers,keyEquivalent,label,labels,loaderInfo,loader,loaderURL,mainScreen,mask,matrix,matrix,matrix,maxSize,maximizable,maximizable,menu,menu,minSize,minimizable,minimizable,miterLimit,mnemonicIndex,mouseChildren,mouseChildren,mouseEnabled,mouseX,mouseY,name,name,name,name,nativeWindow,numChildren,numChildren,numFrames,numItems,opaqueBackground,overState,parameters,parentAllowsChild,parent,parentSandboxBridge,parent,pixelHinting,pixelSnapping,precisionHint,progress,quality,ratios,rect,repeat,resizable,resizable,root,rotation,rotationX,rotationY,rotationZ,sameDomain,scale9Grid,scaleMode,scaleMode,scaleX,scaleY,scaleZ,scenes,screens,scrollRect,shader,shader,sharedEvents,showDefaultContextMenu,smooth,smoothing,soundTransform,soundTransform,spreadMethod,stageFocusRect,stageHeight,stage,stage,stageWidth,submenu,supportsMenu,supportsNotification,supportsTransparency,swfVersion,systemChrome,systemChrome,systemMaxSize,systemMinSize,tabChildren,tabChildren,tabEnabled,tabIndex,target,textSnapshot,textSnapshot,thickness,title,totalFrames,trackAsMenu,trackAsMenu,transform,transparent,transparent,transparent,type,type,type,type,upState,url,useHandCursor,useHandCursor,uvtData,value,vertices,visibleBounds,visible,visible,width,width,width,width,width,width,width,winding,x,x,y,y,z,activate,addChild,addChild,addChildAt,addChildAt,addEventListener,addItem,addItemAt,addSubmenu,addSubmenuAt,applyFilter,areInaccessibleObjectsUnderPoint,assignFocus,beginBitmapFill,beginFill,beginGradientFill,beginShaderFill,cancel,clear,clone,clone,clone,close,close,colorTransform,compare,contains,containsItem,copyChannel,copyFrom,copyPixels,curveTo,curveTo,dispatchEvent,display,dispose,drawCircle,draw,drawEllipse,drawGraphicsData,drawPath,drawRect,drawRoundRect,drawTriangles,endFill,fillRect,floodFill,generateFilterRect,getBounds,getChildAt,getChildByName,getChildIndex,getColorBoundsRect,getItemAt,getItemByName,getItemIndex,getLoaderInfoByDefinition,getObjectsUnderPoint,getPixel32,getPixel,getPixels,getRect,getScreensForRectangle,getVector,globalToLocal3D,globalToLocal,globalToScreen,gotoAndPlay,gotoAndStop,hasEventListener,histogram,hitTestObject,hitTest,hitTestPoint,invalidate,isFocusInaccessible,lineBitmapStyle,lineGradientStyle,lineShaderStyle,lineStyle,lineTo,lineTo,loadBytes,load,local3DToGlobal,localToGlobal,lock,maximize,merge,minimize,moveTo,moveTo,nextFrame,nextScene,noise,notifyUser,orderInBackOf,orderInFrontOf,orderToBack,orderToFront,paletteMap,perlinNoise,pixelDissolve,play,prevFrame,prevScene,removeAllItems,removeChildAt,removeChildAt,removeChild,removeItemAt,removeItem,restore,scroll,setChildIndex,setChildIndex,setItemIndex,setPixel32,setPixel,setPixels,setVector,startDrag,startMove,startResize,start,stopDrag,stop,swapChildrenAt,swapChildrenAt,swapChildren,threshold,toString,unloadAndStop,unload,unlock,wideLineTo,wideMoveTo,willTrigger"><title>flash.display.BitmapData (ActionScript 3.0)</title><script src="../../AC_OETags.js" type="text/javascript"></script></head><body><script language="javascript" type="text/javascript" src="../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../help.js"></script><script language="javascript" type="text/javascript" src="../../cookies.js"></script><script language="javascript" type="text/javascript">  
            <!--  
			    
				asdocTitle = 'BitmapData - ActionScript 3.0 Language and Components Reference';

				var baseRef = '../../';

				window.onload = configPage;
			      
			    -->  
            </script>
<script language="javascript" type="text/javascript"><!--
function submitValue(){
var searchStr=document.getElementById('search-livedocs').value;
window.location="../../search.html"+"###"+searchStr;
}
--></script><script type="text/javascript">
		scrollToNameAnchor();
	</script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">ActionScript 3.0 Language and Components Reference</td><td class="titleTableSearch" align="center"><form class="searchForm" method="get" action="../../search.html" onsubmit="submitValue();"><input class="hidden" name="loc" value="" type="hidden"><input class="hidden" name="termPrefix" value="" type="hidden"><input class="hidden" name="term" value="" type="hidden"><input class="hidden" name="area" value="" type="hidden"><input id="search-livedocs" name="search_text" value="" title="" type="text"> <input type="button" name="action" value="Search" onclick="submitValue()"></form></td><td class="titleTableTopNav" align="right"><a href="../../../../Flash/10.0_Welcome/index.html">Home</a>&nbsp;|&nbsp;<a href="../../package-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Packages</a>&nbsp;|&nbsp;<a href="../../class-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Classes</a>&nbsp;|&nbsp;<a href="../../language-elements.html">Language Elements</a>&nbsp;| <a href="../../all-index-Symbols.html" onclick="loadClassListFrame('../../index-list.html')">Index</a>&nbsp;|&nbsp;<a href="../../appendixes.html">Appendixes</a>&nbsp;|&nbsp;<a href="../../conventions.html">Conventions</a>&nbsp;|&nbsp;<a id="framesLink1" href="../../index.html?flash/display/BitmapData.html&amp;flash/display/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../images/logo.jpg" class="logoImage" alt=" Adobe Logo " title=" Adobe Logo "></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">BitmapData</td><td class="titleTableSubNav" id="subNav" align="right" colspan="2"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a>&nbsp;| <a href="#styleSummary">Styles</a>&nbsp;| <a href="#effectSummary">Effects</a>&nbsp;| <a href="#constantSummary">Constants</a>&nbsp;| <a href="#includeExamplesSummary">Examples</a></td></tr><tr class="titleTableRow3"><td colspan="3">&nbsp;</td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve">
                
                    
                

				<!--

				
				    
				

					if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("BitmapData"); titleBar_setSubNav(false,true,false	,false,false,false,true,true,false	,false,false,false,false,false);}

				    
				        
				    
				-->
                
                    
                
			</script><div class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">flash.display</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public  class  BitmapData</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">BitmapData  <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="../../Object.html">Object</a></td></tr><tr><td class="classHeaderTableLabel">Implements</td><td> <a href="../../flash/display/IBitmapDrawable.html">IBitmapDrawable</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p></p>
        The BitmapData class lets you work with the data (pixels) of a
        <span>Bitmap object</span>
        
        
        . You can use the methods of the BitmapData class
 to create arbitrarily sized transparent or opaque bitmap images and manipulate them in various 
 ways at runtime.
        <span>
          You can also access the BitmapData for a bitmap image
 that you load with the
          <code>flash.display.Loader</code>
          class.
        </span>
        
               <p>This class lets you separate bitmap rendering operations from the  
 internal display updating routines of Flash Player.  By manipulating 
 a BitmapData object directly, you can create complex images without incurring the 
 per-frame overhead of constantly redrawing the content from vector data.</p>
        
               <p>The methods of the BitmapData class support 
 effects that are not available through the filters available to non-bitmap display objects.</p>
        
               <p>A BitmapData object contains an array of pixel data. This data can represent either 
 a fully opaque bitmap or a transparent bitmap that contains alpha channel data. 
 Either type of BitmapData object is stored as a buffer of 32-bit integers. 
 Each 32-bit integer determines the properties of a single pixel in the bitmap.</p>
        
               <p>Each 32-bit integer is a combination of four 8-bit channel values (from 0 to 255) that 
 describe the alpha transparency and the red, green, and blue (ARGB) values of the pixel.
  (For ARGB values, the most significant byte represents the alpha channel value, followed by red, 
 green, and blue.)</p>
        
               <p>
          The four channels (alpha, red, green, and blue) are represented as numbers
 when you use them with the
          <code>BitmapData.copyChannel()</code>
          method or the
          <code>DisplacementMapFilter.componentX</code>
          and
          <code>DisplacementMapFilter.componentY</code>
          properties, and these numbers
 are represented by the following constants in the BitmapDataChannel class:
        </p>
        
               <ul>
                  <li>
                     <code>BitmapDataChannel.ALPHA</code>
                  </li>
                  <li>
                     <code>BitmapDataChannel.RED</code>
                  </li>
                  <li>
                     <code>BitmapDataChannel.GREEN</code>
                  </li>
                  <li>
                     <code>BitmapDataChannel.BLUE</code>
                  </li>
               </ul>
        
               <p>
          You can attach BitmapData objects to a Bitmap object by using the
          <code>bitmapData</code>
          property of the Bitmap object.
        </p>
        
               <p>
          You can use a BitmapData object to fill a Graphics object by using the
          <code>Graphics.beginBitmapFill()</code>
          method.
        </p>
        
               <p>
          In the AIR runtime, the DockIcon, Icon, InteractiveIcon, and SystemTrayIcon classes each include 
 a
          <code>bitmaps</code>
          property that is an array of BitmapData objects that define the bitmap images 
 for an icon.
        </p>
        
               <p>In  AIR 1.5 and Flash Player 10, the maximum size for a BitmapData object is 8,192 pixels in width or height, 
 and the total number of pixels cannot exceed 16,777,216 pixels. (So, if a BitmapData object is 8,192 pixels 
 wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier and AIR 1.1 and earlier, the limitation is
 2,880 pixels in height and 2,880 in width.</p>
        
               <p>
          Calls to any method or property of a BitmapData object throw an ArgumentError error if 
 the BitmapData object is invalid (for example, if it has
          <code>height == 0</code>
          and
          <code>width == 0</code>
          ) or it has been disposed of via dispose().
        </p>
        
            <p></p><p><a href="#includeExamplesSummary">View the examples</a></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="Bitmap.html#bitmapData" target="">flash.display.Bitmap.bitmapData</a><br/><a href="../../flash/desktop/DockIcon.html#bitmaps" target="">flash.desktop.DockIcon.bitmaps</a><br/><a href="Graphics.html#beginBitmapFill()" target="">flash.display.Graphics.beginBitmapFill()</a><br/><a href="../../flash/desktop/Icon.html#bitmaps" target="">flash.desktop.Icon.bitmaps</a><br/><a href="../../flash/desktop/InteractiveIcon.html#bitmaps" target="">flash.desktop.InteractiveIcon.bitmaps</a><br/><a href="Loader.html" target="">flash.display.Loader</a><br/><a href="../../flash/desktop/SystemTrayIcon.html#bitmaps" target="">flash.desktop.SystemTrayIcon.bitmaps</a></div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><div class="showHideLinks"><div id="hideInheritedProperty" class="hideInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(false,'Property');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Hide Inherited Public Properties</a></div><div id="showInheritedProperty" class="showInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(true,'Property');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Public Properties</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th>&nbsp;</th><th colspan="2">Property</th><th>Defined By</th></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../Object.html#constructor" class="signatureLink">constructor</a> : <a href="../../Object.html">Object</a><div class="summaryTableDescription">A reference to the class object or constructor function for a given object instance.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#height" class="signatureLink">height</a> : <a href="../../int.html">int</a><div class="summaryTableDescription">[read-only] The height of the bitmap image in pixels.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="../../Object.html#prototype" class="signatureLink">prototype</a> : <a href="../../Object.html">Object</a><div class="summaryTableDescription">[static] A reference to the prototype object of a class or function object.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#rect" class="signatureLink">rect</a> : <a href="../../flash/geom/Rectangle.html">Rectangle</a><div class="summaryTableDescription">[read-only] The rectangle that defines the size and location of the bitmap image.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#transparent" class="signatureLink">transparent</a> : <a href="../../Boolean.html">Boolean</a><div class="summaryTableDescription">[read-only] Defines whether the bitmap image supports per-pixel transparency.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#width" class="signatureLink">width</a> : <a href="../../int.html">int</a><div class="summaryTableDescription">[read-only] The width of the bitmap image in pixels.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><div class="showHideLinks"><div id="hideInheritedMethod" class="hideInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(false,'Method');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Hide Inherited Public Methods</a></div><div id="showInheritedMethod" class="showInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(true,'Method');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Public Methods</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th>Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#BitmapData()" class="signatureLink">BitmapData</a>(width:<a href="../../int.html">int</a>, height:<a href="../../int.html">int</a>, transparent:<a href="../../Boolean.html">Boolean</a> = true, fillColor:<a href="../../uint.html">uint</a> = 0xFFFFFFFF)</div><div class="summaryTableDescription">Creates a  BitmapData object with a specified width and height.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#applyFilter()" class="signatureLink">applyFilter</a>(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, filter:<a href="../../flash/filters/BitmapFilter.html">BitmapFilter</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Takes a source image and a filter object and generates the 
  filtered image.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#clone()" class="signatureLink">clone</a>():<a href="../../flash/display/BitmapData.html">BitmapData</a></div><div class="summaryTableDescription">Returns a new BitmapData object that is a clone of the original instance
  with an exact copy of the contained bitmap.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#colorTransform()" class="signatureLink">colorTransform</a>(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, colorTransform:<a href="../../flash/geom/ColorTransform.html">ColorTransform</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Adjusts the color values in a specified area of a bitmap image by using a 
  ColorTransform object.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#compare()" class="signatureLink">compare</a>(otherBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>):<a href="../../Object.html">Object</a></div><div class="summaryTableDescription">Compares two BitmapData objects.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#copyChannel()" class="signatureLink">copyChannel</a>(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, sourceChannel:<a href="../../uint.html">uint</a>, destChannel:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Transfers data from one channel of another BitmapData object or the current 
  BitmapData object into a channel of the current BitmapData object.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#copyPixels()" class="signatureLink">copyPixels</a>(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, alphaBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a> = null, alphaPoint:<a href="../../flash/geom/Point.html">Point</a> = null, mergeAlpha:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Provides a fast routine to perform pixel manipulation
  between images with no stretching, rotation, or color effects.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#dispose()" class="signatureLink">dispose</a>():<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Frees memory that is used to store the BitmapData object.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#draw()" class="signatureLink">draw</a>(source:<a href="../../flash/display/IBitmapDrawable.html">IBitmapDrawable</a>, matrix:<a href="../../flash/geom/Matrix.html">Matrix</a> = null, colorTransform:<a href="../../flash/geom/ColorTransform.html">ColorTransform</a> = null, blendMode:<a href="../../String.html">String</a> = null, clipRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a> = null, smoothing:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Draws the source display object onto the bitmap image, using the
  Flash Player or  AIR vector renderer.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#fillRect()" class="signatureLink">fillRect</a>(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, color:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Fills a rectangular area of pixels with a specified ARGB color.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#floodFill()" class="signatureLink">floodFill</a>(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>, color:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Performs a flood fill operation on an image starting
  at an (x, y) coordinate and filling with a certain color.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#generateFilterRect()" class="signatureLink">generateFilterRect</a>(sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, filter:<a href="../../flash/filters/BitmapFilter.html">BitmapFilter</a>):<a href="../../flash/geom/Rectangle.html">Rectangle</a></div><div class="summaryTableDescription">Determines the destination rectangle that the applyFilter() method call affects, given a 
  BitmapData object, a source rectangle, and a filter object.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getColorBoundsRect()" class="signatureLink">getColorBoundsRect</a>(mask:<a href="../../uint.html">uint</a>, color:<a href="../../uint.html">uint</a>, findColor:<a href="../../Boolean.html">Boolean</a> = true):<a href="../../flash/geom/Rectangle.html">Rectangle</a></div><div class="summaryTableDescription">Determines a rectangular region that either fully encloses all pixels of a specified color within the 
  bitmap image (if the findColor parameter is set to true) or fully encloses
  all pixels that do not include the specified color (if the findColor parameter is set 
  to false).</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getPixel()" class="signatureLink">getPixel</a>(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>):<a href="../../uint.html">uint</a></div><div class="summaryTableDescription">Returns an integer that represents  an RGB pixel value from a BitmapData object at
  a specific point (x, y).</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getPixel32()" class="signatureLink">getPixel32</a>(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>):<a href="../../uint.html">uint</a></div><div class="summaryTableDescription">Returns an ARGB color value that contains alpha channel data and RGB
  data.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getPixels()" class="signatureLink">getPixels</a>(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>):<a href="../../flash/utils/ByteArray.html">ByteArray</a></div><div class="summaryTableDescription">Generates a byte array from a rectangular region of pixel data.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getVector()" class="signatureLink">getVector</a>(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>):<a href="../../Vector.html">Vector</a>.&lt;<a href="../../uint.html">uint</a>&gt;</div><div class="summaryTableDescription">Generates a vector array from a rectangular region of pixel data.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../Object.html#hasOwnProperty()" class="signatureLink">hasOwnProperty</a>(name:<a href="../../String.html">String</a>):<a href="../../Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether an object has a specified property defined.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#histogram()" class="signatureLink">histogram</a>(hRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a> = null):<a href="../../Vector.html">Vector</a>.&lt;Vector$Number&gt;</div><div class="summaryTableDescription">Computes a 256 value binary number histogram of a BitmapData object.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#hitTest()" class="signatureLink">hitTest</a>(firstPoint:<a href="../../flash/geom/Point.html">Point</a>, firstAlphaThreshold:<a href="../../uint.html">uint</a>, secondObject:<a href="../../Object.html">Object</a>, secondBitmapDataPoint:<a href="../../flash/geom/Point.html">Point</a> = null, secondAlphaThreshold:<a href="../../uint.html">uint</a> = 1):<a href="../../Boolean.html">Boolean</a></div><div class="summaryTableDescription">Performs pixel-level hit detection between one bitmap image
  and a point, rectangle, or other bitmap image.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../Object.html#isPrototypeOf()" class="signatureLink">isPrototypeOf</a>(theClass:<a href="../../Object.html">Object</a>):<a href="../../Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether an instance of the Object class is in the prototype chain of the object specified 
  as the parameter.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#lock()" class="signatureLink">lock</a>():<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Locks an image so that any objects that reference the BitmapData object, such as Bitmap objects, 
  are not updated when this BitmapData object changes.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#merge()" class="signatureLink">merge</a>(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, redMultiplier:<a href="../../uint.html">uint</a>, greenMultiplier:<a href="../../uint.html">uint</a>, blueMultiplier:<a href="../../uint.html">uint</a>, alphaMultiplier:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Performs per-channel blending from a source image to a destination image.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#noise()" class="signatureLink">noise</a>(randomSeed:<a href="../../int.html">int</a>, low:<a href="../../uint.html">uint</a> = 0, high:<a href="../../uint.html">uint</a> = 255, channelOptions:<a href="../../uint.html">uint</a> = 7, grayScale:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Fills an image with pixels representing random noise.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#paletteMap()" class="signatureLink">paletteMap</a>(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, redArray:<a href="../../Array.html">Array</a> = null, greenArray:<a href="../../Array.html">Array</a> = null, blueArray:<a href="../../Array.html">Array</a> = null, alphaArray:<a href="../../Array.html">Array</a> = null):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Remaps the color channel values in an image that has up to four arrays of color palette data, one 
  for each channel.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#perlinNoise()" class="signatureLink">perlinNoise</a>(baseX:<a href="../../Number.html">Number</a>, baseY:<a href="../../Number.html">Number</a>, numOctaves:<a href="../../uint.html">uint</a>, randomSeed:<a href="../../int.html">int</a>, stitch:<a href="../../Boolean.html">Boolean</a>, fractalNoise:<a href="../../Boolean.html">Boolean</a>, channelOptions:<a href="../../uint.html">uint</a> = 7, grayScale:<a href="../../Boolean.html">Boolean</a> = false, offsets:<a href="../../Array.html">Array</a> = null):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Generates a Perlin noise image.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#pixelDissolve()" class="signatureLink">pixelDissolve</a>(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, randomSeed:<a href="../../int.html">int</a> = 0, numPixels:<a href="../../int.html">int</a> = 0, fillColor:<a href="../../uint.html">uint</a> = 0):<a href="../../int.html">int</a></div><div class="summaryTableDescription">Performs a pixel dissolve either from a source image to a destination image or by using the same image.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../Object.html#propertyIsEnumerable()" class="signatureLink">propertyIsEnumerable</a>(name:<a href="../../String.html">String</a>):<a href="../../Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether the specified property exists and is enumerable.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#scroll()" class="signatureLink">scroll</a>(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Scrolls an image by a certain (x, y) pixel amount.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setPixel()" class="signatureLink">setPixel</a>(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>, color:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Sets a single pixel of a BitmapData object.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setPixel32()" class="signatureLink">setPixel32</a>(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>, color:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Sets the color and alpha transparency values of a single pixel of a BitmapData 
  object.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setPixels()" class="signatureLink">setPixels</a>(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, inputByteArray:<a href="../../flash/utils/ByteArray.html">ByteArray</a>):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Converts a byte array into a rectangular region of pixel data.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../Object.html#setPropertyIsEnumerable()" class="signatureLink">setPropertyIsEnumerable</a>(name:<a href="../../String.html">String</a>, isEnum:<a href="../../Boolean.html">Boolean</a> = true):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Sets the availability of a dynamic property for loop operations.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setVector()" class="signatureLink">setVector</a>(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, inputVector:<a href="../../Vector.html">Vector</a>.&lt;<a href="../../uint.html">uint</a>&gt;):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription"></div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#threshold()" class="signatureLink">threshold</a>(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, operation:<a href="../../String.html">String</a>, threshold:<a href="../../uint.html">uint</a>, color:<a href="../../uint.html">uint</a> = 0, mask:<a href="../../uint.html">uint</a> = 0xFFFFFFFF, copySource:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../uint.html">uint</a></div><div class="summaryTableDescription">Tests pixel values in an image against a specified threshold and sets pixels that pass the test to new color values.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../Object.html#toString()" class="signatureLink">toString</a>():<a href="../../String.html">String</a></div><div class="summaryTableDescription">Returns the string representation of the specified object.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#unlock()" class="signatureLink">unlock</a>(changeRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a> = null):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Unlocks an image so that any objects that reference the BitmapData object, such as Bitmap objects, 
  are updated when this BitmapData object changes.</div></td><td class="summaryTableOwnerCol">BitmapData</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="../../images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="../../Object.html#valueOf()" class="signatureLink">valueOf</a>():<a href="../../Object.html">Object</a></div><div class="summaryTableDescription">Returns the primitive value of the specified object.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr></table></div><script language="javascript" type="text/javascript"><!--
                      showHideInherited();
                      --></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="height"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">height</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>height:<a href="../../int.html">int</a></code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>The height of the bitmap image in pixels.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get height():<a href="../../int.html">int</a></code><br/></div><a name="propertyDetail"></a><a name="rect"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">rect</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>The rectangle that defines the size and location of the bitmap image. The top and left of the 
  rectangle are 0; the width and height are equal to the width and height in pixels of the 
   BitmapData object.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get rect():<a href="../../flash/geom/Rectangle.html">Rectangle</a></code><br/></div><a name="propertyDetail"></a><a name="transparent"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">transparent</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>transparent:<a href="../../Boolean.html">Boolean</a></code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Defines whether the bitmap image supports per-pixel transparency. You can set this value only when you construct 
  a BitmapData object by passing in
          <code>true</code>
          for the
          <code>transparent</code>
          parameter of the constructor. Then, after you create
  a BitmapData object, you can check whether it supports per-pixel transparency by determining if the value of the
          <code>transparent</code>
          property is
          <code>true</code>
          .
        </p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get transparent():<a href="../../Boolean.html">Boolean</a></code><br/></div><a name="propertyDetail"></a><a name="width"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">width</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>width:<a href="../../int.html">int</a></code>&nbsp;&nbsp;[read-only] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>The width of the bitmap image in pixels.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get width():<a href="../../int.html">int</a></code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="BitmapData()"></a><a name="BitmapData(int,int,Boolean,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">BitmapData</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function BitmapData(width:<a href="../../int.html">int</a>, height:<a href="../../int.html">int</a>, transparent:<a href="../../Boolean.html">Boolean</a> = true, fillColor:<a href="../../uint.html">uint</a> = 0xFFFFFFFF)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p>
          Creates a  BitmapData object with a specified width and height. 
  If you specify a value for the
          <code>fillColor</code>
          parameter, every pixel in the bitmap is set 
     to that color.
          <p>
            By default, the bitmap is created as transparent, unless you pass the value
            <code>false</code>
            for the
            <code>transparent</code>
            parameter. After you create an opaque bitmap, you cannot change it to 
  a transparent bitmap. Every pixel in an opaque bitmap uses only 24 bits of color channel information. 
  If you define the bitmap as transparent, every pixel uses 32 bits of color channel information,
  including an alpha transparency channel.
          </p>
          
          <p>In  AIR 1.5 and Flash Player 10, the maximum size for a BitmapData object is 8,192 pixels in width or height, 
  and the total number of pixels cannot exceed 16,777,216 pixels. (So, if a BitmapData object is 8,192 pixels 
  wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier and AIR 1.1 and earlier, the limitation is
  2,880 pixels in height and 2,880 pixels in width.
  If you specify a width or height value that is greater than 2880, a new instance is not created.</p>
          
        </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">width</span>:<a href="../../int.html">int</a></code> &mdash; The width of the bitmap image in pixels.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">height</span>:<a href="../../int.html">int</a></code> &mdash; The height of the bitmap image in pixels.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">transparent</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>true</code>)<code></code> &mdash; 
              Specifies whether the bitmap image  supports per-pixel transparency.
  The default value is
              <code>true</code>
              (transparent). To create a fully transparent bitmap, set the value 
  of the
              <code>transparent</code>
              parameter to
              <code>true</code>
              and the value of the
              <code>fillColor</code>
              parameter to 0x00000000 (or to 0). Setting the
              <code>transparent</code>
              property to
              <code>false</code>
              can result in minor improvements in rendering performance.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">fillColor</span>:<a href="../../uint.html">uint</a></code> (default = <code>0xFFFFFFFF</code>)<code></code> &mdash; A 32-bit ARGB color value that you use to fill the bitmap image area. 
  The default value is 0xFFFFFFFF (solid white).</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../ArgumentError.html">ArgumentError</a> </code> &mdash; width and/or height exceed the maximum dimensions.</td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="applyFilter()"></a><a name="applyFilter(flash.display.BitmapData,flash.geom.Rectangle,flash.geom.Point,flash.filters.BitmapFilter)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">applyFilter</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function applyFilter(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, filter:<a href="../../flash/filters/BitmapFilter.html">BitmapFilter</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Takes a source image and a filter object and generates the 
  filtered image.
          <p>This method relies on the behavior of built-in filter
  objects, which determine the destination
  rectangle that is affected by an input source rectangle.</p>
          
          <p>
            After a filter is applied, the resulting image can be larger than the input image. 
  For example, if you use a BlurFilter class 
  to blur a source rectangle of (50,50,100,100) and a
  destination point of (10,10), the area that changes in the
  destination image is larger than (10,10,60,60) because of
  the blurring. This happens internally during the
            <code>applyFilter()</code>
            call.
          </p>
          
          <p>
            If the
            <code>sourceRect</code>
            parameter of the
            <code>sourceBitmapData</code>
            parameter is 
  an interior region, such as (50,50,100,100) in a 200 x 200 image, the filter uses the source 
  pixels outside the
            <code>sourceRect</code>
            parameter to generate
  the destination rectangle.
          </p>
          
          <p>
            If the BitmapData object and the object specified as the
            <code>sourceBitmapData</code>
            parameter are the same object, the application uses a temporary copy of the object to 
  perform the filter. For best performance, avoid this situation.
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sourceBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; The input bitmap image to use. The source image can be a different 
  BitmapData object or it can refer to the current BitmapData instance.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sourceRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangle that defines the area of the source image to use as input.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">destPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> &mdash; The point within the destination image (the current BitmapData 
  instance) that corresponds to the upper-left corner of the source rectangle.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">filter</span>:<a href="../../flash/filters/BitmapFilter.html">BitmapFilter</a></code> &mdash; 
              The filter object that you use to perform the filtering operation. Each type 
  of filter has certain requirements, as follows:
              <ul><li>
                  <b>BlurFilter</b>
                  &mdash; 
  This filter can use source and destination images
  that are either opaque or transparent. If the formats of the images do
  not match, the copy of the source image that is made during the
  filtering matches the format of the destination image.
                </li><li>
                  <b>BevelFilter, DropShadowFilter, GlowFilter, ChromeFilter</b>
                  &mdash; 
  The destination image of these filters must be a transparent
  image. Calling DropShadowFilter or GlowFilter creates an image that
  contains the alpha channel data of the drop shadow or glow. It does not
  create the drop shadow onto the destination image. If you use any of these
  filters with an opaque destination image, an exception
  is thrown.
                </li><li>
                  <b>ConvolutionFilter</b>
                  &mdash; This filter can use source and
  destination images that are either opaque or transparent.
                </li><li>
                  <b>ColorMatrixFilter</b>
                  &mdash; This filter can use source and
  destination images that are either opaque or transparent.
                </li><li>
                  <b>DisplacementMapFilter</b>
                  &mdash; This filter can use source and
  destination images that are either opaque or transparent, but the
  source and destination image formats must be the same.
                </li></ul>
              
            </td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The sourceBitmapData, sourceRect, destPoint or filter are null.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../flash/errors/IllegalOperationError.html">IllegalOperationError</a> </code> &mdash; The transparency of the BitmapData objects are not
  compatible with the filter operation.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../flash/filters/BevelFilter.html" target="">flash.filters.BevelFilter</a><br/><a href="../../flash/filters/BlurFilter.html" target="">flash.filters.BlurFilter</a><br/><a href="../../flash/filters/ColorMatrixFilter.html" target="">flash.filters.ColorMatrixFilter</a><br/><a href="../../flash/filters/ConvolutionFilter.html" target="">flash.filters.ConvolutionFilter</a><br/><a href="../../flash/filters/DisplacementMapFilter.html" target="">flash.filters.DisplacementMapFilter</a><br/><a href="../../flash/filters/DropShadowFilter.html" target="">flash.filters.DropShadowFilter</a><br/><a href="../../flash/filters/GlowFilter.html" target="">flash.filters.GlowFilter</a><br/><a href="DisplayObject.html#filters" target="">flash.display.DisplayObject.filters</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how to apply a blur filter to a BitmapData instance:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.filters.BlurFilter;

var bmd:BitmapData = new BitmapData(80, 30, false, 0xFFCC00);
var rect:Rectangle = new Rectangle(10, 10, 40, 10);
bmd.fillRect(rect, 0xFF0000);

var pt:Point = new Point(10, 10);
var filter:BlurFilter = new BlurFilter();
bmd.applyFilter(bmd, rect, pt, filter);

var bm:Bitmap = new Bitmap(bmd);
addChild(bm);</pre></div>
        </div></div><a name="clone()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">clone</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function clone():<a href="../../flash/display/BitmapData.html">BitmapData</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>Returns a new BitmapData object that is a clone of the original instance
  with an exact copy of the contained bitmap.</p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; A new BitmapData object that is identical to the original.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how to clone a BitmapData instance, and it shows that when you modify the 
 cloned BitmapData instance, the original remains unmodified:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;

var bmd1:BitmapData = new BitmapData(100, 80, false, 0x00000000);
var bmd2:BitmapData = bmd1.clone();

bmd1.setPixel32(1, 1, 0xFFFFFFFF);

trace(bmd1.getPixel32(1, 1).toString(16)); // ffffffff
trace(bmd2.getPixel32(1, 1).toString(16)); // ff000000

var bm1:Bitmap = new Bitmap(bmd1);
this.addChild(bm1);

var bm2:Bitmap = new Bitmap(bmd2);
bm2.x = 110;
this.addChild(bm2);</pre></div>
        </div></div><a name="colorTransform()"></a><a name="colorTransform(flash.geom.Rectangle,flash.geom.ColorTransform)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">colorTransform</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function colorTransform(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, colorTransform:<a href="../../flash/geom/ColorTransform.html">ColorTransform</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Adjusts the color values in a specified area of a bitmap image by using a
          <code>ColorTransform</code>
          object. If the rectangle 
  matches the boundaries of the bitmap image, this method transforms the color values of  
  the entire image.
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">rect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A Rectangle object that defines the area of the image in which the 
  ColorTransform object is applied.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">colorTransform</span>:<a href="../../flash/geom/ColorTransform.html">ColorTransform</a></code> &mdash; A ColorTransform object that describes the color transformation 
  values to apply.</td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The rect or colorTransform are null.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../flash/geom/ColorTransform.html" target="">flash.geom.ColorTransform</a><br/><a href="../../flash/geom/Rectangle.html" target="">flash.geom.Rectangle</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how to apply a color transform to the left half (rectangle) of a 
 BitmapData object:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.ColorTransform;

var bmd:BitmapData = new BitmapData(80, 30, false, 0xFF0000);

var cTransform:ColorTransform = new ColorTransform();
cTransform.alphaMultiplier = 0.5
var rect:Rectangle = new Rectangle(0, 0, 40, 30);
bmd.colorTransform(rect, cTransform);

var bm:Bitmap = new Bitmap(bmd);
addChild(bm);</pre></div>
        </div></div><a name="compare()"></a><a name="compare(flash.display.BitmapData)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">compare</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function compare(otherBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>):<a href="../../Object.html">Object</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Compares two BitmapData objects. If the two BitmapData objects have the same dimensions 
  (width and height), the method returns a new BitmapData object, in which each pixel is 
  the "difference" between the pixels in the two source objects:
          <ul><li>If two pixels are equal, the difference pixel is 0x00000000.</li><li>
              If two pixels have different RGB values (ignoring the alpha value), the difference 
  pixel is 0xRRGGBB where RR/GG/BB are the individual difference values between red, green, 
  and blue channels (the pixel value in the source object minus the pixel value in the
              <code>otherBitmapData</code>
              object). Alpha channel differences are ignored in this case.
            </li><li>
              If only the alpha channel value is different, the pixel value is 0x
              <i>ZZ</i>
              FFFFFF, 
  where
              <i>ZZ</i>
              is the difference in the alpha values (the alpha value in the source object 
  minus the alpha value in the
              <code>otherBitmapData</code>
              object).
            </li></ul>
          
          <p>For example, consider the following two BitmapData objects:</p>
          
          <div class="listing"><pre>var bmd1:BitmapData = new BitmapData(50, 50, true, 0xFFFF8800);
  var bmd2:BitmapData = new BitmapData(50, 50, true, 0xCCCC6600);
  var diffBmpData:BitmapData = bmd1.compare(bmd2) as BitmapData;
  trace ("0x" + diffBmpData.getPixel(0,0).toString(16); // 0x332200</pre></div>
          
          
          
          <p>
            <b>Note:</b>
            The colors used to fill the two BitmapData objects have slightly different RGB values
  (0xFF0000 and 0xFFAA00). The result of the
            <code>compare()</code>
            method is a new BitmapData
  object with each pixel showing the difference in the RGB values between the two bitmaps.
          </p>
          
          <p>Consider the following two BitmapData objects, in which the RGB colors are the same,
  but the alpha values are different:</p>
          
          <div class="listing"><pre>var bmd1:BitmapData = new BitmapData(50, 50, true, 0xFFFFAA00);
  var bmd2:BitmapData = new BitmapData(50, 50, true, 0xCCFFAA00);
  var diffBmpData:BitmapData = bmd1.compare(bmd2) as BitmapData;
  trace ("0x" + diffBmpData.getPixel32(0,0).toString(16); // 0x33ffffff</pre></div>
          
          
          
          <p>
            The result of the
            <code>compare()</code>
            method is a new BitmapData
  object with each pixel showing the difference in the alpha values between the two bitmaps.
          </p>
          
          <p>If the BitmapData objects are equivalent (with the same width, height, and identical pixel values), 
  the method returns the number 0.</p>
          
          <p>If the widths of the BitmapData objects are not equal, the method returns the number -3.</p>
          
          <p>If the heights of the BitmapData objects are not equal, but the widths are the same, 
  the method returns the number -4.</p>
          
          <p>The following example compares two Bitmap objects with different widths (50 and 60):</p>
          
          <div class="listing"><pre>var bmd1:BitmapData = new BitmapData(100, 50, false, 0xFFFF0000);
  var bmd2:BitmapData = new BitmapData(100, 60, false, 0xFFFFAA00);
  trace(bmd1.compare(bmd2)); // -4</pre></div>
          
          
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">otherBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; The BitmapData object to compare with the source BitmapData object.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../Object.html">Object</a></code> &mdash; If the two BitmapData objects have the same dimensions (width and height), the 
  method returns a new BitmapData object that has the difference between the two objects (see the
  main discussion). If the BitmapData objects are equivalent, the method returns the number 0. 
  If the widths of the BitmapData objects are not equal, the method returns the number -3. 
  If the heights of the BitmapData objects are not equal, the method returns the number -4.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The otherBitmapData is null.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows the value of a pixel in the BitmapData object that results from 
 comparing two BitmapData objects of the same dimensions:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;

var bmd1:BitmapData = new BitmapData(50, 50, true, 0xFFFFAA00);
var bmd2:BitmapData = new BitmapData(50, 50, true, 0xCCFFAA00);
var diffBmpData:BitmapData = BitmapData(bmd1.compare(bmd2));
var diffValue:String = diffBmpData.getPixel32(1, 1).toString(16);
trace (diffValue); // 33ffffff

var bm1:Bitmap = new Bitmap(bmd1);
addChild(bm1);
var bm2:Bitmap = new Bitmap(bmd2);
addChild(bm2);
bm2.x = 60;</pre></div>
        </div></div><a name="copyChannel()"></a><a name="copyChannel(flash.display.BitmapData,flash.geom.Rectangle,flash.geom.Point,uint,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">copyChannel</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function copyChannel(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, sourceChannel:<a href="../../uint.html">uint</a>, destChannel:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Transfers data from one channel of another BitmapData object or the current 
  BitmapData object into a channel of the current BitmapData object. 
  All of the data in the other channels in the destination BitmapData object are 
  preserved.
          <p>The source channel value and destination channel value can be
  one of following values:</p>
          
          <ul><li>
              <code>BitmapDataChannel.RED</code>
            </li><li>
              <code>BitmapDataChannel.GREEN</code>
            </li><li>
              <code>BitmapDataChannel.BLUE</code>
            </li><li>
              <code>BitmapDataChannel.ALPHA</code>
            </li></ul>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sourceBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; The input bitmap image to use. The source image can be a different BitmapData object 
       or it can refer to the current BitmapData object.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sourceRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; The source Rectangle object. To copy only channel data from a smaller area 
  within the bitmap, specify a source rectangle that is smaller than the overall size of the
  BitmapData object.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">destPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> &mdash; The destination Point object that represents the upper-left corner of the rectangular area 
  where the new channel data is placed. 
   To copy only channel data
   from one area to a different area in the destination image, specify a point other than (0,0).</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sourceChannel</span>:<a href="../../uint.html">uint</a></code> &mdash; 
              The source channel. Use a value from the BitmapDataChannel class
  (
              <code>BitmapDataChannel.RED</code>
              ,
              <code>BitmapDataChannel.BLUE</code>
              ,
              <code>BitmapDataChannel.GREEN</code>
              ,
              <code>BitmapDataChannel.ALPHA</code>
              ).
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">destChannel</span>:<a href="../../uint.html">uint</a></code> &mdash; 
              The destination channel. Use a value from the BitmapDataChannel class
  (
              <code>BitmapDataChannel.RED</code>
              ,
              <code>BitmapDataChannel.BLUE</code>
              ,
              <code>BitmapDataChannel.GREEN</code>
              ,
              <code>BitmapDataChannel.ALPHA</code>
              ).
            </td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The sourceBitmapData, sourceRect or destPoint are null.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../flash/geom/Rectangle.html" target="">flash.geom.Rectangle</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how to copy the red channel in a BitmapData object to its own
 blue channel in a 20 x 20 pixel region:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;

var bmd:BitmapData = new BitmapData(100, 80, false, 0x00FF0000);

var rect:Rectangle = new Rectangle(0, 0, 20, 20);
var pt:Point = new Point(10, 10);
bmd.copyChannel(bmd, rect, pt, BitmapDataChannel.RED, BitmapDataChannel.BLUE);

var bm:Bitmap = new Bitmap(bmd);
this.addChild(bm);</pre></div>
        </div></div><a name="copyPixels()"></a><a name="copyPixels(flash.display.BitmapData,flash.geom.Rectangle,flash.geom.Point,flash.display.BitmapData,flash.geom.Point,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">copyPixels</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function copyPixels(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, alphaBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a> = null, alphaPoint:<a href="../../flash/geom/Point.html">Point</a> = null, mergeAlpha:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Provides a fast routine to perform pixel manipulation
  between images with no stretching, rotation, or color effects. This method copies a
  rectangular area of a source image to a
  rectangular area of the same size at the destination point of the destination 
  BitmapData object.
          <p>
            If you include the
            <code>alphaBitmap</code>
            and
            <code>alphaPoint</code>
            parameters, you can use a secondary 
  image as an alpha source for the source image. If the source
  image has alpha data, both sets of alpha data are used to
  composite pixels from the source image to the destination image. The
            <code>alphaPoint</code>
            parameter is the point in the alpha image that
  corresponds to the upper-left corner of the source
  rectangle. Any pixels outside the intersection of the source
  image and alpha image are not copied to the destination image.
          </p>
          
          <p>
            The
            <code>mergeAlpha</code>
            property controls whether or not the alpha
  channel is used when a transparent image is copied onto
  another transparent image. To copy
  pixels with the alpha channel data, set the
            <code>mergeAlpha</code>
            property to
            <code>true</code>
            . By default, the
            <code>mergeAlpha</code>
            property is
            <code>false</code>
            .
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sourceBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; The input bitmap image from which to copy pixels. The source image can be a 
  different BitmapData instance, or it can refer to the current BitmapData 
  instance.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sourceRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangle that defines the area of the source image to use as input.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">destPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> &mdash; The destination point that represents the upper-left corner of the rectangular 
  area where the new pixels are placed.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">alphaBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> (default = <code>null</code>)<code></code> &mdash; A secondary, alpha BitmapData object source.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">alphaPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> (default = <code>null</code>)<code></code> &mdash; 
              The point in the alpha BitmapData object source that corresponds to 
  the upper-left corner of the
              <code>sourceRect</code>
              parameter.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">mergeAlpha</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> &mdash; 
              To use the alpha channel, set the value to
              <code>true</code>
              . To copy pixels with no alpha channel, set the value to
              <code>false</code>
              .
            </td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The sourceBitmapData, sourceRect, destPoint are null.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how to copy pixels from a 20 x 20 pixel region in one BitmapData object
 to another BitmapData object:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;

var bmd1:BitmapData = new BitmapData(40, 40, false, 0x000000FF);
var bmd2:BitmapData = new BitmapData(80, 40, false, 0x0000CC44);

var rect:Rectangle = new Rectangle(0, 0, 20, 20);
var pt:Point = new Point(10, 10);
bmd2.copyPixels(bmd1, rect, pt);

var bm1:Bitmap = new Bitmap(bmd1);
this.addChild(bm1);
var bm2:Bitmap = new Bitmap(bmd2);
this.addChild(bm2);
bm2.x = 50;</pre></div>
        </div></div><a name="dispose()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">dispose</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function dispose():<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Frees memory that is used to store the BitmapData object.
          <p>
            When the
            <code>dispose()</code>
            method is called on an image, the width and height of the image are set to 0. 
  All subsequent calls to methods or properties of this BitmapData instance fail, and an  
  exception is thrown.
          </p>
          
        </p><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows the effect of calling a method of a BitmapData object after a call to the
          <code>dispose()</code>
          method (an exception is thrown):
          <div class="listing"><pre>import flash.display.BitmapData;

var myBitmapData:BitmapData = new BitmapData(100, 80, false, 0x000000FF);
trace(myBitmapData.getPixel(1, 1)); // 255 == 0xFF

myBitmapData.dispose();
try {
    trace(myBitmapData.getPixel(1, 1));
} catch (error:Error) {
    trace(error); // ArgumentError
}</pre></div>
        </div></div><a name="draw()"></a><a name="draw(flash.display.IBitmapDrawable,flash.geom.Matrix,flash.geom.ColorTransform,String,flash.geom.Rectangle,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">draw</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function draw(source:<a href="../../flash/display/IBitmapDrawable.html">IBitmapDrawable</a>, matrix:<a href="../../flash/geom/Matrix.html">Matrix</a> = null, colorTransform:<a href="../../flash/geom/ColorTransform.html">ColorTransform</a> = null, blendMode:<a href="../../String.html">String</a> = null, clipRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a> = null, smoothing:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Draws the
          <code>source</code>
          display object onto the bitmap image, using the
          <span>Flash Player or</span>
          AIR vector renderer.
          <span>Flash Player or</span>
          AIR vector renderer. 
  You can specify
          <code>matrix</code>
          ,
          <code>colorTransform</code>
          ,
          <code>blendMode</code>
          , and a destination
          <code>clipRect</code>
          parameter to control
  how the rendering performs. Optionally, you can specify whether the bitmap
  should be smoothed when scaled (this works only if the source object
   is a BitmapData object).
          <p>This method directly corresponds to how objects are drawn
  with the standard vector renderer for objects in the authoring tool
  interface.</p>
          
          <p>
            The source display object does not use any of its applied transformations
  for this call. It is treated as it exists in the library or
  file, with no matrix transform, no color transform, and no blend
  mode. To draw a display object (such as a movie clip) by using its own transform properties, 
  you can copy its
            <code>transform</code>
            property object to the
            <code>transform</code>
            property 
  of the Bitmap object that uses the BitmapData object.
          </p>
          
          <p>
            This method is supported over RTMP in
            <span>Flash Player 9.0.115.0
  and later and in</span>
            Adobe AIR. You can control access to streams on 
     Flash Media Server in a server-side script. For more information, see the
            <code>Client.audioSampleAccess</code>
            and
            <code>Client.videoSampleAccess</code>
            properties in
            <a href="http://www.adobe.com/go/documentation" target="external">
              
              <i>Server-Side ActionScript Language Reference for Adobe Flash Media Server</i>
            </a>
            .
          </p>
          
          <p>
            If the source object and (in the case of a Sprite or MovieClip object) all 
  of its child objects do not come from the same domain as the caller, or are not in a content that is 
  accessible to the caller by having called the
            <code>Security.allowDomain()</code>
            method, a call to
  the
            <code>draw()</code>
            throws a SecurityError exception. This restriction does not apply
  to AIR content in the application security sandbox.
          </p>
          
          <p>
            There are also restrictions on using a loaded bitmap image as the
            <code>source</code>
            .
  A call to the
            <code>draw()</code>
            method is successful if the loaded image comes from the same domain as the caller. 
  Also, a cross-domain policy file on the image's server can grant permission to the domain of the SWF content
  calling the
            <code>draw()</code>
            method. In this case, you must set the
            <code>checkPolicyFile</code>
            property 
  of a LoaderContext object, and use this object as the
            <code>context</code>
            parameter when calling the
            <code>load()</code>
            method of the Loader object used to load the image. These restrictions do not apply to AIR content in the 
  application security sandbox.
          </p>
          
          <p>
            On Windows, the
            <code>draw()</code>
            method cannot capture SWF content embedded in an HTML 
  page
            <span>in an HTMLLoader object in Adobe AIR</span>
            .
          </p>
          
          <p>
            The
            <code>draw()</code>
            method cannot capture PDF content
            <span>in Adobe AIR</span>
            .
  Nor can it capture  or SWF content embedded in HTML in which the
            <code>wmode</code>
            attribute is set
  to
            <code>"window"</code>
            <span>in Adobe AIR</span>
            .
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">source</span>:<a href="../../flash/display/IBitmapDrawable.html">IBitmapDrawable</a></code> &mdash; The display object or BitmapData object to draw to the BitmapData object.
  (The DisplayObject and BitmapData classes implement the IBitmapDrawable interface.)</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">matrix</span>:<a href="../../flash/geom/Matrix.html">Matrix</a></code> (default = <code>null</code>)<code></code> &mdash; 
              A Matrix object used to scale, rotate, or translate the coordinates 
  of the bitmap. If you do not want to apply a matrix transformation to the image, 
  set this parameter to an identity matrix, created with the default
              <code>new Matrix()</code>
              constructor, or pass a
              <code>null</code>
              value.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">colorTransform</span>:<a href="../../flash/geom/ColorTransform.html">ColorTransform</a></code> (default = <code>null</code>)<code></code> &mdash; 
              A ColorTransform object that you use to adjust the color values of 
  the bitmap. If no object is supplied, the bitmap image's colors are not transformed.
  If you must pass this parameter but you do not want to transform the image, set this 
  parameter to a ColorTransform object created with the default
              <code>new ColorTransform()</code>
              constructor.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">blendMode</span>:<a href="../../String.html">String</a></code> (default = <code>null</code>)<code></code> &mdash; A string value, from the flash.display.BlendMode class, specifying the 
  blend mode to be applied to the resulting bitmap.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">clipRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> (default = <code>null</code>)<code></code> &mdash; A Rectangle object that defines the area of the source object to draw. 
  If you do not supply this value, no clipping occurs and the entire source object is drawn.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">smoothing</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> &mdash; 
              A Boolean value that determines whether a BitmapData object is 
  smoothed when scaled or rotated, due to a scaling or rotation in the
              <code>matrix</code>
              parameter. The
              <code>smoothing</code>
              parameter only applies if the
              <code>source</code>
              parameter is a BitmapData object. With
              <code>smoothing</code>
              set to
              <code>false</code>
              ,
  the rotated or scaled BitmapData image can appear pixelated or jagged. For example, the following
  two images use the same BitmapData object for the
              <code>source</code>
              parameter, but the
              <code>smoothing</code>
              parameter is set to
              <code>true</code>
              on the left and
              <code>false</code>
              on the right:
              <p>
                <img src="../../images/bitmapData_draw_smoothing.jpg" alt="Two images: the left one with smoothing and the right one without smoothing."></img>
              </p>
              
              <p>
                Drawing a bitmap with
                <code>smoothing</code>
                set to
                <code>true</code>
                takes longer 
  than doing so with
                <code>smoothing</code>
                set to
                <code>false</code>
                .
              </p>
              
            </td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../ArgumentError.html">ArgumentError</a> </code> &mdash; 
              The
              <code>source</code>
              parameter is not a BitmapData
  or DisplayObject object.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../SecurityError.html">SecurityError</a> </code> &mdash; 
              The
              <code>source</code>
              object and (in the case of
  a Sprite or MovieClip object) all of its child objects do not come from the same domain as 
  the caller, or are not in a content that is accessible to the caller by having called the
              <code>Security.allowDomain()</code>
              method. This restriction does not apply
  to AIR content in the application security sandbox.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../ArgumentError.html">ArgumentError</a> </code> &mdash; The source is null or not a valid IBitmapDrawable object.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="BlendMode.html" target="">flash.display.BlendMode</a><br/><a href="../../flash/geom/ColorTransform.html" target="">flash.geom.ColorTransform</a><br/><a href="../../flash/geom/Matrix.html" target="">flash.geom.Matrix</a><br/><a href="../../flash/system/JPEGLoaderContext.html" target="">flash.system.JPEGLoaderContext</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how to draw a TextField object to a BitmapData object:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.text.TextField;

var tf:TextField = new TextField();
tf.text = "bitmap text";

var myBitmapData:BitmapData = new BitmapData(80, 20);
myBitmapData.draw(tf);
var bmp:Bitmap = new Bitmap(myBitmapData);
this.addChild(bmp);</pre></div>
        </div></div><a name="fillRect()"></a><a name="fillRect(flash.geom.Rectangle,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">fillRect</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function fillRect(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, color:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>Fills a rectangular area of pixels with a specified ARGB color.</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">rect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; The rectangular area to fill.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">color</span>:<a href="../../uint.html">uint</a></code> &mdash; The ARGB color value that fills the area. ARGB colors are often 
  specified in hexadecimal format; for example, 0xFF336699.</td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The rect is null.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../flash/geom/Rectangle.html" target="">flash.geom.Rectangle</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how to fill a rectangular region of a BitmapData object with blue:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;

var myBitmapData:BitmapData = new BitmapData(40, 40, false, 0x0000FF00);

var rect:Rectangle = new Rectangle(0, 0, 20, 20);
myBitmapData.fillRect(rect, 0x0000FF);

var bm:Bitmap = new Bitmap(myBitmapData);
addChild(bm);</pre></div>
        </div></div><a name="floodFill()"></a><a name="floodFill(int,int,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">floodFill</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function floodFill(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>, color:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Performs a flood fill operation on an image starting
  at an (
          <i>x</i>
          ,
          <i>y</i>
          ) coordinate and filling with a certain color. The
          <code>floodFill()</code>
          method is similar to the paint bucket tool in various paint 
  programs. The color is an ARGB color that contains alpha information and
     color information.
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">x</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>x</i>
              coordinate of the image.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">y</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>y</i>
              coordinate of the image.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">color</span>:<a href="../../uint.html">uint</a></code> &mdash; The ARGB color to use as a fill.</td></tr></table></p><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how to fill a region of a BitmapData object &mdash; that is, the region 
 surrounding the pixel defined by the point
          <code>(10, 10)</code>
          iin which all colors march the color at that 
 point &mdash; with red
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;

var myBitmapData:BitmapData = new BitmapData(40, 40, false, 0x0000FF00);

var rect:Rectangle = new Rectangle(0, 0, 20, 20);
myBitmapData.fillRect(rect, 0x000000FF);
rect = new Rectangle(15, 15, 25, 25);
myBitmapData.fillRect(rect, 0x000000FF);

myBitmapData.floodFill(10, 10, 0x00FF0000);

var bm:Bitmap = new Bitmap(myBitmapData);
addChild(bm);</pre></div>
        </div></div><a name="generateFilterRect()"></a><a name="generateFilterRect(flash.geom.Rectangle,flash.filters.BitmapFilter)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">generateFilterRect</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function generateFilterRect(sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, filter:<a href="../../flash/filters/BitmapFilter.html">BitmapFilter</a>):<a href="../../flash/geom/Rectangle.html">Rectangle</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Determines the destination rectangle that the
          <code>applyFilter()</code>
          method call affects, given a 
  BitmapData object, a source rectangle, and a filter object.
          <p>
            For example, a blur filter normally affects an area larger than the size of the original 
  image. A 100 x 200 pixel image that is being filtered by a default BlurFilter 
  instance, where
            <code>blurX = blurY = 4</code>
            generates a destination rectangle of
            <code>(-2,-2,104,204)</code>
            .
  The
            <code>generateFilterRect()</code>
            method lets you find out the size of this destination 
  rectangle in advance so that you can size the destination image appropriately before you perform a filter 
  operation.
          </p>
          
          <p>
            Some filters clip their destination rectangle based on the source image size. 
  For example, an inner
            <code>DropShadow</code>
            does not generate a larger result than its source
  image. In this API, the BitmapData object is used as the source bounds and not the 
  source
            <code>rect</code>
            parameter.
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sourceRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangle defining the area of the source image to use as input.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">filter</span>:<a href="../../flash/filters/BitmapFilter.html">BitmapFilter</a></code> &mdash; A filter object that you use to calculate the destination rectangle.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; 
              A destination rectangle computed by using an image, the
              <code>sourceRect</code>
              parameter, 
  and a filter.
            </td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The sourceRect or filter are null.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows how you can use the
          <code>generateFilterRect()</code>
          method to 
 determine the rectangular area that the result of a blur filter will occupy. The results of the
          <code>generateFilterRect()</code>
          method are output by the
          <code>trace()</code>
          function:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.filters.BlurFilter;

var bmd:BitmapData = new BitmapData(80, 30, false, 0xFFCC00);
var rect:Rectangle = new Rectangle(10, 10, 40, 10);
bmd.fillRect(rect, 0xFF0000);

var pt:Point = new Point(10, 10);
var filter:BlurFilter = new BlurFilter();

trace(bmd.generateFilterRect(rect, filter));
// (x=8, y=8, w=44, h=14)

bmd.applyFilter(bmd, rect, pt, filter);
var bm:Bitmap = new Bitmap(bmd);
addChild(bm);</pre></div>
          Note that the
          <code>generateFilterRect()</code>
          method does not apply the filter. Call the
          <code>applyFilter()</code>
          method 
 to apply the filter.
        </div></div><a name="getColorBoundsRect()"></a><a name="getColorBoundsRect(uint,uint,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getColorBoundsRect</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getColorBoundsRect(mask:<a href="../../uint.html">uint</a>, color:<a href="../../uint.html">uint</a>, findColor:<a href="../../Boolean.html">Boolean</a> = true):<a href="../../flash/geom/Rectangle.html">Rectangle</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Determines a rectangular region that either fully encloses all pixels of a specified color within the 
  bitmap image (if the
          <code>findColor</code>
          parameter is set to
          <code>true</code>
          ) or fully encloses
  all pixels that do not include the specified color (if the
          <code>findColor</code>
          parameter is set 
  to
          <code>false</code>
          ).
          <p>
            For example, if you have a source image and you want to determine the rectangle of
  the image that contains a nonzero alpha channel, pass
            <code>{mask: 0xFF000000, color: 0x00000000}</code>
            as parameters. If the
            <code>findColor</code>
            parameter is set to
            <code>true</code>
            , the entire image is searched for the bounds of pixels 
  for which
            <code>(value & mask) == color</code>
            (where
            <code>value</code>
            is the color value
  of the pixel). If the
            <code>findColor</code>
            parameter is set to
            <code>false</code>
            , the entire 
  image is searched for the bounds of pixels for which
            <code>(value & mask) != color</code>
            (where
            <code>value</code>
            is the color value of the pixel). To determine white space around an
  image, pass
            <code>{mask: 0xFFFFFFFF, color: 0xFFFFFFFF}</code>
            to find the bounds of nonwhite pixels.
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">mask</span>:<a href="../../uint.html">uint</a></code> &mdash; 
              A hexadecimal value, specifying the bits of the ARGB color to consider. The color 
  value is combined with this hexadecimal value, by using the
              <code>&</code>
              (bitwise AND) operator.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">color</span>:<a href="../../uint.html">uint</a></code> &mdash; 
              A hexadecimal value, specifying the ARGB color to match (if
              <code>findColor</code>
              is set to
              <code>true</code>
              ) or
              <i>not</i>
              to match (if
              <code>findColor</code>
              is set to
              <code>false</code>
              ).
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">findColor</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>true</code>)<code></code> &mdash; 
              If the value is set to
              <code>true</code>
              , returns the bounds of a color value in an image. 
  If the value is set to
              <code>false</code>
              , returns the bounds of where this color doesn't exist in an image.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; The region of the image that is the specified color.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a BitmapData object with red in the top half of its pixels. It then calls
 the
          <code>getColorBoundsRect()</code>
          method to determine the rectangle in which pixels are red (0xFF0000), and 
 then it calls the same method to determine the rectangle in which pixels are not red (by setting the
          <code>findColor</code>
          parameter to
          <code>false</code>
          :
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;

var bmd:BitmapData = new BitmapData(80, 40, false, 0xFFFFFF);
var rect:Rectangle = new Rectangle(0, 0, 80, 20);
bmd.fillRect(rect, 0xFF0000);

var maskColor:uint = 0xFFFFFF; 
var color:uint = 0xFF0000;  
var redBounds:Rectangle = bmd.getColorBoundsRect(maskColor, color, true);
trace(redBounds); // (x=0, y=0, w=80, h=20)

var notRedBounds:Rectangle = bmd.getColorBoundsRect(maskColor, color, false);
trace(notRedBounds); // (x=0, y=20, w=80, h=20)

var bm:Bitmap = new Bitmap(bmd);
addChild(bm);</pre></div>
        </div></div><a name="getPixel()"></a><a name="getPixel(int,int)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getPixel</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getPixel(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>):<a href="../../uint.html">uint</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Returns an integer that represents  an RGB pixel value from a BitmapData object at
  a specific point (
          <i>x</i>
          ,
          <i>y</i>
          ). The
          <code>getPixel()</code>
          method returns an
  unmultiplied pixel value. No alpha information is returned.
          <p>All pixels in a BitmapData object are stored as premultiplied color values. 
  A premultiplied image pixel has the red, green, and blue 
  color channel values already multiplied by the alpha data. For example, if the 
  alpha value is 0, the values for the RGB channels are also 0, independent of their unmultiplied 
  values. This loss of data can cause some problems when you perform operations. All BitmapData 
  methods take and return unmultiplied values. The internal pixel representation is converted 
  from premultiplied to unmultiplied before it is returned as a value. During a set operation, 
  the pixel value is premultiplied before the raw image pixel is set.</p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">x</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>x</i>
              position of the pixel.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">y</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>y</i>
              position of the pixel.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../uint.html">uint</a></code> &mdash; 
              A number that represents an RGB pixel value. If the (
              <i>x</i>
              ,
              <i>y</i>
              ) coordinates are 
  outside the bounds of the image, the method returns 0.
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="BitmapData.html#getPixel32()" target="">getPixel32()</a><br/><a href="BitmapData.html#setPixel()" target="">setPixel()</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a BitmapData object filled with red, then uses the
          <code>getPixel()</code>
          method to determine the color value in the upper-left pixel:
          <div class="listing"><pre>import flash.display.BitmapData;

var bmd:BitmapData = new BitmapData(80, 40, false, 0xFF0000);

var pixelValue:uint = bmd.getPixel(1, 1);
trace(pixelValue.toString(16)); // ff0000;</pre></div>
        </div></div><a name="getPixel32()"></a><a name="getPixel32(int,int)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getPixel32</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getPixel32(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>):<a href="../../uint.html">uint</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Returns an ARGB color value that contains alpha channel data and RGB
  data. This method is similar to the
          <code>getPixel()</code>
          method, which returns an
  RGB color without alpha channel data.
          <p>All pixels in a BitmapData object are stored as premultiplied color values. 
  A premultiplied image pixel has the red, green, and blue 
  color channel values already multiplied by the alpha data. For example, if the 
  alpha value is 0, the values for the RGB channels are also 0, independent of their unmultiplied 
  values. This loss of data can cause some problems when you perform operations. All BitmapData 
  methods take and return unmultiplied values. The internal pixel representation is converted 
  from premultiplied to unmultiplied before it is returned as a value. During a set operation, 
  the pixel value is premultiplied before the raw image pixel is set.</p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">x</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>x</i>
              position of the pixel.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">y</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>y</i>
              position of the pixel.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../uint.html">uint</a></code> &mdash; 
              A number representing an ARGB pixel value. If the (
              <i>x</i>
              ,
              <i>y</i>
              ) coordinates are 
     outside the bounds of the image, 0 is returned.
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="BitmapData.html#getPixel()" target="">getPixel()</a><br/><a href="BitmapData.html#setPixel32()" target="">setPixel32()</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a BitmapData object filled with a color, then uses the
          <code>getPixel32()</code>
          method to determine the color value in the upper-left pixel, and then
 determines the hexidecimal values for each color component (alpha, red, green, and blue):
          <div class="listing"><pre>import flash.display.BitmapData;

var bmd:BitmapData = new BitmapData(80, 40, true, 0xFF44AACC);

var pixelValue:uint = bmd.getPixel32(1, 1);
var alphaValue:uint = pixelValue &gt;&gt; 24 & 0xFF;
var red:uint = pixelValue &gt;&gt; 16 & 0xFF;
var green:uint = pixelValue &gt;&gt; 8 & 0xFF;
var blue:uint = pixelValue & 0xFF;

trace(alphaValue.toString(16)); // ff
trace(red.toString(16)); // 44
trace(green.toString(16)); // aa
trace(blue.toString(16)); // cc</pre></div>
        </div></div><a name="getPixels()"></a><a name="getPixels(flash.geom.Rectangle)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getPixels</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getPixels(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>):<a href="../../flash/utils/ByteArray.html">ByteArray</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>Generates a byte array from a rectangular region of pixel data. 
  Writes an unsigned integer (a 32-bit unmultiplied pixel value)
  for each pixel into the byte array.</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">rect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangular area in the current BitmapData object.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../flash/utils/ByteArray.html">ByteArray</a></code> &mdash; A ByteArray representing the pixels in the given Rectangle.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The rect is null.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../flash/utils/ByteArray.html" target="">flash.utils.ByteArray</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a BitmapData object filled with random noise pixels, then uses the
          <code>getPixels()</code>
          method to fill a ByteArray object with the pixel values of the BitmapData object
          <div class="listing"><pre>import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.utils.ByteArray;

var bmd:BitmapData = new BitmapData(80, 40, true);
var seed:int = int(Math.random() * int.MAX_VALUE);
bmd.noise(seed);

var bounds:Rectangle = new Rectangle(0, 0, bmd.width, bmd.height);
var pixels:ByteArray = bmd.getPixels(bounds);</pre></div>
        </div></div><a name="getVector()"></a><a name="getVector(flash.geom.Rectangle)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getVector</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getVector(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>):<a href="../../Vector.html">Vector</a>.&lt;<a href="../../uint.html">uint</a>&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>Generates a vector array from a rectangular region of pixel data. 
  Returns a Vector object of unsigned integers (a 32-bit unmultiplied pixel value)
  for the specified rectangle.</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">rect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangular area in the current BitmapData object.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../Vector.html">Vector</a>.&lt;<a href="../../uint.html">uint</a>&gt;</code> &mdash; A Vector representing the given Rectangle.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The rect is null.</td></tr></table></div><a name="histogram()"></a><a name="histogram(flash.geom.Rectangle)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">histogram</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function histogram(hRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a> = null):<a href="../../Vector.html">Vector</a>.&lt;Vector$Number&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>Computes a 256 value binary number histogram of a BitmapData object. This method returns a Vector object 
  containing four Vector.&lt;Number> instances (four Vector objects that contain Number objects). 
  The four Vector instances represent the red, green, blue and alpha components 
  in order. Each Vector instance contains 256 values that represent the population 
  count of an individual component value, from 0 to 255.</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">hRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> (default = <code>null</code>)<code></code> &mdash; The area of the BitmapData object to use.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../Vector.html">Vector</a>.&lt;Vector$Number&gt;</code></td></tr></table></div><a name="hitTest()"></a><a name="hitTest(flash.geom.Point,uint,Object,flash.geom.Point,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">hitTest</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function hitTest(firstPoint:<a href="../../flash/geom/Point.html">Point</a>, firstAlphaThreshold:<a href="../../uint.html">uint</a>, secondObject:<a href="../../Object.html">Object</a>, secondBitmapDataPoint:<a href="../../flash/geom/Point.html">Point</a> = null, secondAlphaThreshold:<a href="../../uint.html">uint</a> = 1):<a href="../../Boolean.html">Boolean</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Performs pixel-level hit detection between one bitmap image
  and a point, rectangle, or other bitmap image. A hit is defined as 
  an overlap of a point or rectangle over an opaque pixel, or two 
  overlapping opaque pixels. No stretching,
  rotation, or other transformation of either object is considered when 
  the hit test is performed.
          <p>If an image is an opaque image, it is considered a fully opaque rectangle for this 
  method. Both images must be transparent images to perform pixel-level hit testing that 
  considers transparency. When you are testing two transparent images, the alpha threshold 
  parameters control what alpha channel values, from 0 to 255, are considered opaque.</p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">firstPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> &mdash; 
              A position of the upper-left corner of the BitmapData image in an arbitrary coordinate space.
  The same coordinate space is used in defining the
              <code>secondBitmapPoint</code>
              parameter.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">firstAlphaThreshold</span>:<a href="../../uint.html">uint</a></code> &mdash; The smallest alpha channel value that is considered opaque for this hit test.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">secondObject</span>:<a href="../../Object.html">Object</a></code> &mdash; A  Rectangle, Point, Bitmap, or BitmapData object.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">secondBitmapDataPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> (default = <code>null</code>)<code></code> &mdash; 
              A point that defines a pixel location in the second BitmapData object. 
                            Use this parameter only when the value of
              <code>secondObject</code>
              is a 
                            BitmapData object.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">secondAlphaThreshold</span>:<a href="../../uint.html">uint</a></code> (default = <code>1</code>)<code></code> &mdash; 
              The smallest alpha channel value that is considered opaque in the second BitmapData object.
                            Use this parameter only when the value of
              <code>secondObject</code>
              is a 
                            BitmapData object and both BitmapData objects are transparent.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../Boolean.html">Boolean</a></code> &mdash; 
              A value of
              <code>true</code>
              if a hit occurs; otherwise,
              <code>false</code>
              .
            </td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../ArgumentError.html">ArgumentError</a> </code> &mdash; 
              The
              <code>secondObject</code>
              parameter is not a Point, Rectangle, 
  Bitmap, or BitmapData object.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The firstPoint is null.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a BitmapData object that is only opaque in a rectangular region
 (20, 20, 40, 40) and calls the
          <code>hitTest()</code>
          method with a Point object as the
          <code>secondObject</code>
          .
 In the first call, the Point object defines the upper-left corner of the BitmapData object, which is not opaque, and
 in the second call, the Point object defines the center of the BitmapData object, which is opaque.
          <div class="listing"><pre>import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;

var bmd1:BitmapData = new BitmapData(80, 80, true, 0x00000000);
var rect:Rectangle = new Rectangle(20, 20, 40, 40);
bmd1.fillRect(rect, 0xFF0000FF);

var pt1:Point = new Point(1, 1);
trace(bmd1.hitTest(pt1, 0xFF, pt1)); // false
var pt2:Point = new Point(40, 40);
trace(bmd1.hitTest(pt1, 0xFF, pt2)); // true</pre></div>
        </div></div><a name="lock()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">lock</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function lock():<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Locks an image so that any objects that reference the BitmapData object, such as Bitmap objects, 
  are not updated when this BitmapData object changes. To improve performance, use this method  
  along with the
          <code>unlock()</code>
          method before and after numerous calls to the
          <code>setPixel()</code>
          or
          <code>setPixel32()</code>
          method.
        </p><p><span class="label">See also</span></p><div class="seeAlso"><a href="BitmapData.html#setPixel()" target="">setPixel()</a><br/><a href="BitmapData.html#setPixel32()" target="">setPixel32()</a><br/><a href="BitmapData.html#unlock()" target="">unlock()</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a BitmapData object based on the
          <code>bitmapData</code>
          property of a Bitmap object,
          <code>picture</code>
          .
 It then calls the
          <code>lock()</code>
          method before calling a complicated custom function,
          <code>complexTransformation()</code>
          , that modifies the BitmapData object. (The
          <code>picture</code>
          object
 and the
          <code>complexTransformation()</code>
          function are not defined in this example.) Even if the
          <code>complexTransformation()</code>
          function updates the
          <code>bitmapData</code>
          property of 
 the
          <code>picture</code>
          object, changes are not reflected until the code calls the
          <code>unlock()</code>
          method on the
          <code>bitmapData</code>
          object:
          <div class="listing"><pre>import flash.display.BitmapData;

var bitmapData:BitmapData = picture.bitmapData;
bitmapData.lock();
bitmapData = complexTransformation(bitmapData);
bitmapData.unlock();
picture.bitmapData = bitmapData;</pre></div>
        </div></div><a name="merge()"></a><a name="merge(flash.display.BitmapData,flash.geom.Rectangle,flash.geom.Point,uint,uint,uint,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">merge</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function merge(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, redMultiplier:<a href="../../uint.html">uint</a>, greenMultiplier:<a href="../../uint.html">uint</a>, blueMultiplier:<a href="../../uint.html">uint</a>, alphaMultiplier:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Performs per-channel blending from a source image to a destination image. For each channel 
     and each pixel, a new value is computed based on the channel values of the source and destination 
     pixels. For example, in the red channel, the new value is computed as follows (where
          <code>redSrc</code>
          is the red channel value for a pixel in the source image and
          <code>redDest</code>
          is the red channel 
     value at the corresponding pixel of the destination image):
          <p>
            
            <code>new redDest = [(redSrc * redMultiplier) + (redDest * (256 - redMultiplier))] / 256;</code>
            
          </p>
          
          <p>
            The
            <code>redMultiplier</code>
            ,
            <code>greenMultiplier</code>
            ,
            <code>blueMultiplier</code>
            , and
            <code>alphaMultiplier</code>
            values are the multipliers used for each color channel. Use a hexadecimal
     value ranging from
            <code>0</code>
            to
            <code>0x100</code>
            (256) where
            <code>0</code>
            specifies the full
     value from the destination is used in the result,
            <code>0x100</code>
            specifies the full value from the
     source is used, and numbers in between specify a blend is used (such as
            <code>0x80</code>
            for 50%).
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sourceBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; The input bitmap image to use. The source image can be a different 
  BitmapData object, or it can refer to the current BitmapData object.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sourceRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangle that defines the area of the source image to use as input.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">destPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> &mdash; The point within the destination image (the current BitmapData 
  instance) that corresponds to the upper-left corner of the source rectangle.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">redMultiplier</span>:<a href="../../uint.html">uint</a></code> &mdash; A hexadecimal uint value by which to multiply the red channel value.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">greenMultiplier</span>:<a href="../../uint.html">uint</a></code> &mdash; A hexadecimal uint value by which to multiply the green channel value.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">blueMultiplier</span>:<a href="../../uint.html">uint</a></code> &mdash; A hexadecimal uint value by which to multiply the blue channel value.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">alphaMultiplier</span>:<a href="../../uint.html">uint</a></code> &mdash; A hexadecimal uint value by which to multiply the alpha transparency value.</td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The sourceBitmapData, sourceRect or destPoint are null.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates two BitmapData objects. Both are 100 x 80 pixels in size. The first
 is filled with green and the second is filled with red. The code calls the
          <code>merge()</code>
          method, merging
 the second BitmapData pixels into the first BitmapData object, but only on a specified rectangular area:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;

var bmd1:BitmapData = new BitmapData(100, 80, true, 0xFF00FF00);
var bmd2:BitmapData = new BitmapData(100, 80, true, 0xFFFF0000);
var rect:Rectangle = new Rectangle(0, 0, 20, 20);
var pt:Point = new Point(20, 20);
var mult:uint = 0x80; // 50% 
bmd1.merge(bmd2, rect, pt, mult, mult, mult, mult);

var bm1:Bitmap = new Bitmap(bmd1);
addChild(bm1);
var bm2:Bitmap = new Bitmap(bmd2);
addChild(bm2);
bm2.x = 110;</pre></div>
        </div></div><a name="noise()"></a><a name="noise(int,uint,uint,uint,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">noise</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function noise(randomSeed:<a href="../../int.html">int</a>, low:<a href="../../uint.html">uint</a> = 0, high:<a href="../../uint.html">uint</a> = 255, channelOptions:<a href="../../uint.html">uint</a> = 7, grayScale:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>Fills an image with pixels representing random noise.</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">randomSeed</span>:<a href="../../int.html">int</a></code> &mdash; The random seed number to use. If you keep all other parameters 
  the same, you can generate different pseudo-random results by varying the random seed value. The noise 
  function is a mapping function, not a true random-number generation function, so it creates the same 
  results each time from the same random seed.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">low</span>:<a href="../../uint.html">uint</a></code> (default = <code>0</code>)<code></code> &mdash; The lowest value to generate for each channel (0 to 255).</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">high</span>:<a href="../../uint.html">uint</a></code> (default = <code>255</code>)<code></code> &mdash; The highest value to generate for each channel (0 to 255).</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">channelOptions</span>:<a href="../../uint.html">uint</a></code> (default = <code>7</code>)<code></code> &mdash; 
              A number that can be a combination of any of
  the four color channel values (
              <code>BitmapDataChannel.RED</code>
              ,
              <code>BitmapDataChannel.BLUE</code>
              ,
              <code>BitmapDataChannel.GREEN</code>
              , and
              <code>BitmapDataChannel.ALPHA</code>
              ). You can use the logical OR 
  operator (
              <code>|</code>
              ) to combine channel values.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">grayScale</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> &mdash; 
              A Boolean value. If the value is
              <code>true</code>
              , a grayscale image is created by setting
  all of the color channels to the same value. 
  The alpha channel selection is not affected by
  setting this parameter to
              <code>true</code>
              .
            </td></tr></table></p><p><span class="label">See also</span></p><div class="seeAlso"><a href="BitmapDataChannel.html#RED" target="">flash.display.BitmapDataChannel.RED</a><br/><a href="BitmapDataChannel.html#BLUE" target="">flash.display.BitmapDataChannel.BLUE</a><br/><a href="BitmapDataChannel.html#GREEN" target="">flash.display.BitmapDataChannel.GREEN</a><br/><a href="BitmapDataChannel.html#ALPHA" target="">flash.display.BitmapDataChannel.ALPHA</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates two BitmapData objects and calls the
          <code>noise()</code>
          method on both. However, the
          <code>grayscale</code>
          parameter is set to
          <code>false</code>
          for the 
 call to the
          <code>noise()</code>
          method of the first object, and it is set to
          <code>true</code>
          for the 
 call to the
          <code>noise()</code>
          method of the second object:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.BitmapDataChannel;

var bmd1:BitmapData = new BitmapData(80, 80);
var bmd2:BitmapData = new BitmapData(80, 80);

var seed:int = int(Math.random() * int.MAX_VALUE);
bmd1.noise(seed, 0, 0xFF, BitmapDataChannel.RED, false);
bmd2.noise(seed, 0, 0xFF, BitmapDataChannel.RED, true);

var bm1:Bitmap = new Bitmap(bmd1);
this.addChild(bm1);
var bm2:Bitmap = new Bitmap(bmd2);
this.addChild(bm2);
bm2.x = 90;</pre></div>
        </div></div><a name="paletteMap()"></a><a name="paletteMap(flash.display.BitmapData,flash.geom.Rectangle,flash.geom.Point,Array,Array,Array,Array)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">paletteMap</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function paletteMap(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, redArray:<a href="../../Array.html">Array</a> = null, greenArray:<a href="../../Array.html">Array</a> = null, blueArray:<a href="../../Array.html">Array</a> = null, alphaArray:<a href="../../Array.html">Array</a> = null):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Remaps the color channel values in an image that has up to four arrays of color palette data, one 
  for each channel.
          <p>
            <span>Flash Player or</span>
            AIR uses the following steps to 
  generate the resulting image:
          </p>
          
          <ol><li>After the red, green, blue, and alpha 
  values are computed, they are added together using standard 32-bit-integer arithmetic.</li><li>
              The red, green, blue, and alpha channel values of each pixel are extracted into separate 0 to 255 values. 
  These values are used to look up new color values in the appropriate array:
              <code>redArray</code>
              ,
              <code>greenArray</code>
              ,
              <code>blueArray</code>
              , and
              <code>alphaArray</code>
              .
  Each of these four arrays should contain 256 values.
            </li><li>After all four of the new channel values are retrieved, they are combined into a standard 
  ARGB value that is applied to the pixel.</li></ol>
          
          <p>Cross-channel effects can be supported with this method. 
  Each input array can contain full 32-bit values, and no shifting occurs when the 
  values are added together. This routine does not support per-channel 
  clamping.</p>
          
          <p>If no array is specified for a channel,
  the color channel is copied from the source image to the
  destination image.</p>
          
          <p>You can use this method for a variety of effects such as 
  general palette mapping (taking one channel and converting it
  to a false color image). You can also use this method for a variety of advanced color 
  manipulation algorithms, such as gamma, curves, levels, and quantizing.</p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sourceBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; The input bitmap image to use. The source image can be a different 
                      BitmapData object, or it can refer to the current BitmapData instance.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sourceRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangle that defines the area of the source image to use as input.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">destPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> &mdash; The point within the destination image (the current BitmapData 
                    object) that corresponds to the upper-left corner of the source rectangle.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">redArray</span>:<a href="../../Array.html">Array</a></code> (default = <code>null</code>)<code></code> &mdash; 
              If
              <code>redArray</code>
              is not
              <code>null</code>
              ,
              <code>red = redArray[source red value]
                   else red = source rect value</code>
              .
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">greenArray</span>:<a href="../../Array.html">Array</a></code> (default = <code>null</code>)<code></code> &mdash; 
              If
              <code>greenArray</code>
              is not
              <code>null</code>
              ,
              <code>green = greenArray[source 
                     green value] else green = source green value.</code>
              
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">blueArray</span>:<a href="../../Array.html">Array</a></code> (default = <code>null</code>)<code></code> &mdash; 
              If
              <code>blueArray</code>
              is not
              <code>null</code>
              ,
              <code>blue = blueArray[source blue 
                    value] else blue = source blue value</code>
              .
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">alphaArray</span>:<a href="../../Array.html">Array</a></code> (default = <code>null</code>)<code></code> &mdash; 
              If
              <code>alphaArray</code>
              is not
              <code>null</code>
              ,
              <code>alpha = alphaArray[source 
                     alpha value] else alpha = source alpha value</code>
              .
            </td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The sourceBitmapData, sourceRect or destPoint are null.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a green BitmapData object with a red center square, and then
 uses the
          <code>paletteMap()</code>
          method to swap red with green in the bottom rectangular half of the 
 BitmapData object:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Point;

var myBitmapData:BitmapData = new BitmapData(80, 80, false, 0x00FF0000);
myBitmapData.fillRect(new Rectangle(20, 20, 40, 40), 0x0000FF00);

var redArray:Array = new Array(256);
var greenArray:Array = new Array(256);

for(var i:uint = 0; i &lt; 255; i++) {
    redArray[i] = 0x00000000;
    greenArray[i] = 0x00000000;
}

redArray[0xFF] = 0x0000FF00;
greenArray[0xFF] = 0x00FF0000;

var bottomHalf:Rectangle = new Rectangle(0, 0, 100, 40);
var pt:Point = new Point(0, 0);
myBitmapData.paletteMap(myBitmapData, bottomHalf, pt, redArray, greenArray);

var bm1:Bitmap = new Bitmap(myBitmapData);
addChild(bm1);</pre></div>
        </div></div><a name="perlinNoise()"></a><a name="perlinNoise(Number,Number,uint,int,Boolean,Boolean,uint,Boolean,Array)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">perlinNoise</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function perlinNoise(baseX:<a href="../../Number.html">Number</a>, baseY:<a href="../../Number.html">Number</a>, numOctaves:<a href="../../uint.html">uint</a>, randomSeed:<a href="../../int.html">int</a>, stitch:<a href="../../Boolean.html">Boolean</a>, fractalNoise:<a href="../../Boolean.html">Boolean</a>, channelOptions:<a href="../../uint.html">uint</a> = 7, grayScale:<a href="../../Boolean.html">Boolean</a> = false, offsets:<a href="../../Array.html">Array</a> = null):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Generates a Perlin noise image.
          <p>The Perlin noise generation algorithm interpolates and combines individual random noise functions (called octaves)
  into a single function that generates more natural-seeming random noise. Like musical octaves, each octave function is twice the 
  frequency of the one before it. Perlin noise has been described as a "fractal sum of noise" because it combines multiple sets of noise data
  with different levels of detail.</p>
          
          <p>You can use Perlin noise functions to simulate natural 
  phenomena and landscapes, such as wood grain, clouds, and mountain ranges. In most cases, the output of a Perlin noise function 
  is not displayed directly but is used to enhance other images and give them pseudo-random variations.</p>
          
          <p>Simple digital random noise functions often produce images with harsh, contrasting points. This kind of harsh contrast 
  is not often found in nature. The Perlin noise algorithm blends multiple noise functions that operate at different levels of detail. 
   This algorithm results in smaller variations among neighboring pixel values.</p>
          
          <p>
            <b>Note:</b>
            The Perlin noise algorithm is named for Ken Perlin, who developed it after generating computer graphics for the 1982 film
            <i>Tron</i>
            .
  Perlin received an Academy Award for Technical Achievement for the Perlin noise function in 1997.
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">baseX</span>:<a href="../../Number.html">Number</a></code> &mdash; 
              Frequency to use in the
              <i>x</i>
              direction. For example, to generate a noise that 
  is sized for a 64 x 128 image, pass 64 for the
              <code>baseX</code>
              value.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">baseY</span>:<a href="../../Number.html">Number</a></code> &mdash; 
              Frequency to use in the
              <i>y</i>
              direction. For example, to generate a noise that 
  is sized for a 64 x 128 image, pass 128 for the
              <code>baseY</code>
              value.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">numOctaves</span>:<a href="../../uint.html">uint</a></code> &mdash; Number of octaves or individual noise functions to combine to create this noise. Larger numbers of octaves create 
  images with greater detail. Larger numbers of octaves also require more processing time.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">randomSeed</span>:<a href="../../int.html">int</a></code> &mdash; The random seed number to use. If you keep all other parameters the same, you can generate different
  pseudo-random results by varying the random seed value. The Perlin noise function is a mapping function, not a 
  true random-number generation function, so it creates the same results each time from the same random seed.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">stitch</span>:<a href="../../Boolean.html">Boolean</a></code> &mdash; 
              A Boolean value. If the value is
              <code>true</code>
              , the method attempts to smooth the transition edges of the image to create seamless textures for 
  tiling as a bitmap fill.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">fractalNoise</span>:<a href="../../Boolean.html">Boolean</a></code> &mdash; 
              A Boolean value. If the value is
              <code>true</code>
              , the method generates fractal noise; otherwise,
  it generates turbulence. An image with turbulence has visible discontinuities in the gradient
  that can make it better approximate sharper visual effects like flames and ocean waves.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">channelOptions</span>:<a href="../../uint.html">uint</a></code> (default = <code>7</code>)<code></code> &mdash; 
              A number that can be a combination of any of
  the four color channel values (
              <code>BitmapDataChannel.RED</code>
              ,
              <code>BitmapDataChannel.BLUE</code>
              ,
              <code>BitmapDataChannel.GREEN</code>
              , and
              <code>BitmapDataChannel.ALPHA</code>
              ). You can use the logical OR 
  operator (
              <code>|</code>
              ) to combine channel values.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">grayScale</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> &mdash; 
              A Boolean value. If the value is
              <code>true</code>
              , a grayscale image is created by setting
  each of the red, green, and blue color channels to 
  identical values. The alpha channel value is not affected if this value is 
  set to
              <code>true</code>
              .
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">offsets</span>:<a href="../../Array.html">Array</a></code> (default = <code>null</code>)<code></code> &mdash; 
              An array of points that correspond to
              <i>x</i>
              and
              <i>y</i>
              offsets for each octave. 
  By manipulating the offset values you can smoothly scroll the layers of a perlinNoise image. 
  Each point in the offset array affects a specific octave noise function.
            </td></tr></table></p><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a 200 x 200 pixel BitmapData object that calls the
          <code>perlinNoise()</code>
          method to generate a red and blue watercolor effect:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;

var bmd:BitmapData = new BitmapData(200, 200, false, 0x00CCCCCC);

var seed:Number = Math.floor(Math.random() * 10);
var channels:uint = BitmapDataChannel.RED | BitmapDataChannel.BLUE;
bmd.perlinNoise(100, 80, 6, seed, false, true, channels, false, null);

var bm:Bitmap = new Bitmap(bmd);
addChild(bm);</pre></div>
        </div></div><a name="pixelDissolve()"></a><a name="pixelDissolve(flash.display.BitmapData,flash.geom.Rectangle,flash.geom.Point,int,int,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">pixelDissolve</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function pixelDissolve(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, randomSeed:<a href="../../int.html">int</a> = 0, numPixels:<a href="../../int.html">int</a> = 0, fillColor:<a href="../../uint.html">uint</a> = 0):<a href="../../int.html">int</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Performs a pixel dissolve either from a source image to a destination image or by using the same image.
          <span>Flash Player or</span>
          AIR uses a
          <code>randomSeed</code>
          value
  to generate a random pixel dissolve. The return value
  of the function must be passed in on subsequent calls to
  continue the pixel dissolve until it is finished.
          <p>If the source image does not equal the destination image,
  pixels are copied from the source to the destination by using all of the
  properties. This process allows dissolving from a blank image into a
  fully populated image.</p>
          
          <p>
            If the source and destination images are equal, pixels are
  filled with the
            <code>color</code>
            parameter. This process allows dissolving away
  from a fully populated image. In this mode, the destination
            <code>point</code>
            parameter is ignored.
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sourceBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; The input bitmap image to use. The source image can be a different 
  BitmapData object, or it can refer to the current BitmapData instance.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sourceRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangle that defines the area of the source image to use as input.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">destPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> &mdash; The point within the destination image (the current BitmapData 
  instance) that corresponds to the upper-left corner of the source rectangle.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">randomSeed</span>:<a href="../../int.html">int</a></code> (default = <code>0</code>)<code></code> &mdash; The random seed to use to start the pixel dissolve.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">numPixels</span>:<a href="../../int.html">int</a></code> (default = <code>0</code>)<code></code> &mdash; The default is 1/30 of the source area (width x height).</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">fillColor</span>:<a href="../../uint.html">uint</a></code> (default = <code>0</code>)<code></code> &mdash; An ARGB color value that you use to fill pixels whose
  source value equals its destination value.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../int.html">int</a></code> &mdash; The new random seed value to use for subsequent calls.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The sourceBitmapData, sourceRect or destPoint are null.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The numPixels value is negative</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example uses the
          <code>pixelDissolve()</code>
          method to convert a grey BitmapData object to a red one by dissolving 
 40 pixels at a time until all pixels have changed colors:
          <div class="listing"><pre>import flash.display.BitmapData;
import flash.display.Bitmap;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.utils.Timer;
import flash.events.TimerEvent;

var bmd:BitmapData = new BitmapData(100, 80, false, 0x00CCCCCC);
var bitmap:Bitmap = new Bitmap(bmd);
addChild(bitmap);

var tim:Timer = new Timer(20);
tim.start();
tim.addEventListener(TimerEvent.TIMER, timerHandler);
 
function timerHandler(event:TimerEvent):void {
    var randomNum:Number = Math.floor(Math.random() * int.MAX_VALUE);
    dissolve(randomNum);
}

function dissolve(randomNum:Number):void {
    var rect:Rectangle = bmd.rect;
    var pt:Point = new Point(0, 0);
    var numberOfPixels:uint = 100;
    var red:uint = 0x00FF0000;
    bmd.pixelDissolve(bmd, rect, pt, randomNum, numberOfPixels, red);
    var grayRegion:Rectangle = bmd.getColorBoundsRect(0xFFFFFFFF, 0x00CCCCCC, true);
    if(grayRegion.width == 0 && grayRegion.height == 0 ) {
        tim.stop();
    }
}</pre></div>
        </div></div><a name="scroll()"></a><a name="scroll(int,int)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">scroll</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function scroll(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Scrolls an image by a certain (
          <i>x</i>
          ,
          <i>y</i>
          ) pixel amount. Edge
  regions outside the scrolling area are left unchanged.
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">x</span>:<a href="../../int.html">int</a></code> &mdash; The amount by which to scroll horizontally.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">y</span>:<a href="../../int.html">int</a></code> &mdash; The amount by which to scroll vertically.</td></tr></table></p><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example shows the effect of scrolling a Bitmap data object 40 pixels to the right:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;

var bmd:BitmapData = new BitmapData(80, 80, true, 0xFFCCCCCC);
var rect:Rectangle = new Rectangle(0, 0, 40, 40);
bmd.fillRect(rect, 0xFFFF0000);
            
var bm:Bitmap = new Bitmap(bmd);
addChild(bm);

trace (bmd.getPixel32(50, 20).toString(16)); // ffcccccccc

bmd.scroll(30, 0); 

trace (bmd.getPixel32(50, 20).toString(16)); // ffff0000</pre></div>
        </div></div><a name="setPixel()"></a><a name="setPixel(int,int,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setPixel</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function setPixel(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>, color:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Sets a single pixel of a BitmapData object. The current
  alpha channel value of the image pixel is preserved during this
  operation. The value of the RGB color parameter is treated as an unmultiplied color value.
          <p>
            <b>Note:</b>
            To increase performance, when you use the
            <code>setPixel()</code>
            or
            <code>setPixel32()</code>
            method repeatedly, call the
            <code>lock()</code>
            method before
  you call the
            <code>setPixel()</code>
            or
            <code>setPixel32()</code>
            method, and then call 
  the
            <code>unlock()</code>
            method when you have made all pixel changes. This process prevents objects
  that reference this BitmapData instance from updating until you finish making 
  the pixel changes.
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">x</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>x</i>
              position of the pixel whose value changes.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">y</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>y</i>
              position of the pixel whose value changes.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">color</span>:<a href="../../uint.html">uint</a></code> &mdash; The resulting RGB color for the pixel.</td></tr></table></p><p><span class="label">See also</span></p><div class="seeAlso"><a href="BitmapData.html#getPixel()" target="">getPixel()</a><br/><a href="BitmapData.html#setPixel32()" target="">setPixel32()</a><br/><a href="BitmapData.html#lock()" target="">lock()</a><br/><a href="BitmapData.html#unlock()" target="">unlock()</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example uses the
          <code>setPixel()</code>
          method to draw a red line in a BitmapData object:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;

var bmd:BitmapData = new BitmapData(80, 80, false, 0xCCCCCC);

for (var i:uint = 0; i &lt; 80; i++) {
    var red:uint = 0xFF0000;
    bmd.setPixel(i, 40, red);
}

var bm:Bitmap = new Bitmap(bmd);
addChild(bm);</pre></div>
        </div></div><a name="setPixel32()"></a><a name="setPixel32(int,int,uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setPixel32</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function setPixel32(x:<a href="../../int.html">int</a>, y:<a href="../../int.html">int</a>, color:<a href="../../uint.html">uint</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Sets the color and alpha transparency values of a single pixel of a BitmapData 
  object. This method is similar to the
          <code>setPixel()</code>
          method; the main difference is 
  that the
          <code>setPixel32()</code>
          method takes an
  ARGB color value that contains alpha channel information.
          <p>All pixels in a BitmapData object are stored as premultiplied color values. 
  A premultiplied image pixel has the red, green, and blue 
  color channel values already multiplied by the alpha data. For example, if the 
  alpha value is 0, the values for the RGB channels are also 0, independent of their unmultiplied 
  values. This loss of data can cause some problems when you perform operations. All BitmapData 
  methods take and return unmultiplied values. The internal pixel representation is converted 
  from premultiplied to unmultiplied before it is returned as a value. During a set operation, 
  the pixel value is premultiplied before the raw image pixel is set.</p>
          
          <p>
            <b>Note:</b>
            To increase performance, when you use the
            <code>setPixel()</code>
            or
            <code>setPixel32()</code>
            method repeatedly, call the
            <code>lock()</code>
            method before
  you call the
            <code>setPixel()</code>
            or
            <code>setPixel32()</code>
            method, and then call 
  the
            <code>unlock()</code>
            method when you have made all pixel changes. This process prevents objects
  that reference this BitmapData instance from updating until you finish making 
  the pixel changes.
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">x</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>x</i>
              position of the pixel whose value changes.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">y</span>:<a href="../../int.html">int</a></code> &mdash; 
              The
              <i>y</i>
              position of the pixel whose value changes.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">color</span>:<a href="../../uint.html">uint</a></code> &mdash; The resulting ARGB color for the pixel. If the bitmap is opaque 
  (not transparent), the alpha transparency portion of this color value is ignored.</td></tr></table></p><p><span class="label">See also</span></p><div class="seeAlso"><a href="BitmapData.html#setPixel()" target="">setPixel()</a><br/><a href="BitmapData.html#getPixel32()" target="">getPixel32()</a><br/><a href="BitmapData.html#lock()" target="">lock()</a><br/><a href="BitmapData.html#unlock()" target="">unlock()</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example uses the
          <code>setPixel32()</code>
          method to draw a transparent (alpha == 0x60) red line in a BitmapData object:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;

var bmd:BitmapData = new BitmapData(80, 80, true, 0xFFCCCCCC);

for (var i:uint = 0; i &lt; 80; i++) {
    var red:uint = 0x60FF0000;
    bmd.setPixel32(i, 40, red);
}

var bm:Bitmap = new Bitmap(bmd);
addChild(bm);</pre></div>
        </div></div><a name="setPixels()"></a><a name="setPixels(flash.geom.Rectangle,flash.utils.ByteArray)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setPixels</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function setPixels(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, inputByteArray:<a href="../../flash/utils/ByteArray.html">ByteArray</a>):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Converts a byte array into a rectangular region of pixel data. For each
  pixel, the
          <code>ByteArray.readUnsignedInt()</code>
          method is called and the return value is 
  written into the pixel.  If the byte array ends before the full rectangle
  is written, the function returns.  The data in the byte array is
  expected to be 32-bit ARGB pixel values. No seeking is performed
  on the byte array before or after the pixels are read.
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">rect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; Specifies the rectangular region of the BitmapData object.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">inputByteArray</span>:<a href="../../flash/utils/ByteArray.html">ByteArray</a></code> &mdash; A ByteArray object that consists of 32-bit unmultiplied pixel values
  to be used in the rectangular region.</td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../flash/errors/EOFError.html">EOFError</a> </code> &mdash; 
              The
              <code>inputByteArray</code>
              object does not include enough data
  to fill the area of the
              <code>rect</code>
              rectangle. The method fills as many pixels as 
  possible before throwing the exception.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The rect or inputByteArray are null.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="../../flash/utils/ByteArray.html#readUnsignedInt()" target="">flash.utils.ByteArray.readUnsignedInt()</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example uses the
          <code>getPixels()</code>
          and
          <code>setPixels()</code>
          methods to copy pixels from one BitmapData object to another:
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.utils.ByteArray;
import flash.geom.Rectangle;

var bmd1:BitmapData = new BitmapData(100, 100, true, 0xFFCCCCCC);
var bmd2:BitmapData = new BitmapData(100, 100, true, 0xFFFF0000);

var rect:Rectangle = new Rectangle(0, 0, 100, 100);
var bytes:ByteArray = bmd1.getPixels(rect);

bytes.position = 0;
bmd2.setPixels(rect, bytes);

var bm1:Bitmap = new Bitmap(bmd1);
addChild(bm1);
var bm2:Bitmap = new Bitmap(bmd2);
addChild(bm2);
bm2.x = 110;</pre></div>
        </div></div><a name="setVector()"></a><a name="setVector(flash.geom.Rectangle,Vector$uint)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setVector</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function setVector(rect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, inputVector:<a href="../../Vector.html">Vector</a>.&lt;<a href="../../uint.html">uint</a>&gt;):<a href="../../specialTypes.html#void">void</a></code><p></p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">rect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code></td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">inputVector</span>:<a href="../../Vector.html">Vector</a>.&lt;<a href="../../uint.html">uint</a>&gt;</code></td></tr></table></p></div><a name="threshold()"></a><a name="threshold(flash.display.BitmapData,flash.geom.Rectangle,flash.geom.Point,String,uint,uint,uint,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">threshold</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function threshold(sourceBitmapData:<a href="../../flash/display/BitmapData.html">BitmapData</a>, sourceRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a>, destPoint:<a href="../../flash/geom/Point.html">Point</a>, operation:<a href="../../String.html">String</a>, threshold:<a href="../../uint.html">uint</a>, color:<a href="../../uint.html">uint</a> = 0, mask:<a href="../../uint.html">uint</a> = 0xFFFFFFFF, copySource:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../uint.html">uint</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Tests pixel values in an image against a specified threshold and sets pixels that pass the test to new color values.
  Using the
          <code>threshold()</code>
          method, you can isolate and replace color ranges in an image and perform other 
  logical operations on image pixels.
          <p>
            The
            <code>threshold()</code>
            method's test logic is as follows:
          </p>
          
          <ol><li>
              If
              <code>((pixelValue & mask) operation (threshold & mask))</code>
              , then
   set the pixel to
              <code>color</code>
              ;
            </li><li>
              Otherwise, if
              <code>copySource == true</code>
              , then
   set the pixel to corresponding pixel value from
              <code>sourceBitmap</code>
              .
            </li></ol>
          
          <p>
            The
            <code>operation</code>
            parameter specifies the comparison operator to use for the threshold test.
  For example, by using "==" as the
            <code>operation</code>
            parameter, you
  can isolate a specific color value in an image. Or by using
            <code>{operation:
  "&lt;", mask: 0xFF000000, threshold: 0x7F000000, color:
  0x00000000}</code>
            , you can set all destination pixels to be fully transparent
  when the source image pixel's alpha is less than 0x7F. You can use this technique
  for animated transitions and other effects.
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sourceBitmapData</span>:<a href="../../flash/display/BitmapData.html">BitmapData</a></code> &mdash; The input bitmap image to use. The source image can be a different 
  BitmapData object or it can refer to the current BitmapData instance.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sourceRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> &mdash; A rectangle that defines the area of the source image to use as input.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">destPoint</span>:<a href="../../flash/geom/Point.html">Point</a></code> &mdash; The point within the destination image (the current BitmapData 
  instance) that corresponds to the upper-left corner of the source rectangle.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">operation</span>:<a href="../../String.html">String</a></code> &mdash; One of the following comparison operators, passed as a String: "&lt;", "&lt;=", ">", ">=", "==", "!="</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">threshold</span>:<a href="../../uint.html">uint</a></code> &mdash; The value that each pixel is tested against to see if it meets or exceeds the threshhold.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">color</span>:<a href="../../uint.html">uint</a></code> (default = <code>0</code>)<code></code> &mdash; The color value that a pixel is set to if the threshold test succeeds. The default value is 0x00000000.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">mask</span>:<a href="../../uint.html">uint</a></code> (default = <code>0xFFFFFFFF</code>)<code></code> &mdash; The mask to use to isolate a color component.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">copySource</span>:<a href="../../Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> &mdash; 
              If the value is
              <code>true</code>
              , pixel values from the source image are copied to the destination  
  when the threshold test fails. If the value is
              <code>false</code>
              , the source image is not copied when the 
  threshold test fails.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../uint.html">uint</a></code> &mdash; The number of pixels that were changed.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../TypeError.html">TypeError</a> </code> &mdash; The sourceBitmapData, sourceRect destPoint or operation are null.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../ArgumentError.html">ArgumentError</a> </code> &mdash; The operation string is not a valid operation</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example uses the
          <code>perlinNoise()</code>
          method to 
 add a blue and red pattern to one BitmapData object, and then uses the
          <code>threshold()</code>
          method to copy those pixels from the first BitmapData object to a second one, replacing those pixels 
 in which the red value is greater than 0x80 (50%) with a pixel set to transparent red (0x20FF0000):
          <div class="listing"><pre>import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.BitmapDataChannel;
import flash.geom.Point;
import flash.geom.Rectangle;

var bmd1:BitmapData = new BitmapData(200, 200, true, 0xFFCCCCCC);

var seed:int = int(Math.random() * int.MAX_VALUE);
var channels:uint = BitmapDataChannel.RED | BitmapDataChannel.BLUE;
bmd1.perlinNoise(100, 80, 12, seed, false, true, channels, false, null);

var bitmap1:Bitmap = new Bitmap(bmd1);
addChild(bitmap1);

var bmd2:BitmapData = new BitmapData(200, 200, true, 0xFFCCCCCC);
var pt:Point = new Point(0, 0);
var rect:Rectangle = new Rectangle(0, 0, 200, 200);
var threshold:uint =  0x00800000; 
var color:uint = 0x20FF0000;
var maskColor:uint = 0x00FF0000;
bmd2.threshold(bmd1, rect, pt, "&gt;", threshold, color, maskColor, true);

var bitmap2:Bitmap = new Bitmap(bmd2);
bitmap2.x = bitmap1.x + bitmap1.width + 10;
addChild(bitmap2);</pre></div>
        </div></div><a name="unlock()"></a><a name="unlock(flash.geom.Rectangle)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">unlock</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function unlock(changeRect:<a href="../../flash/geom/Rectangle.html">Rectangle</a> = null):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Unlocks an image so that any objects that reference the BitmapData object, such as Bitmap objects, 
  are updated when this BitmapData object changes. To improve performance, use this method  
  along with the
          <code>lock()</code>
          method before and after numerous calls to the
          <code>setPixel()</code>
          or
          <code>setPixel32()</code>
          method.
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">changeRect</span>:<a href="../../flash/geom/Rectangle.html">Rectangle</a></code> (default = <code>null</code>)<code></code> &mdash; The area of the BitmapData object that has changed. If you do not specify a value for 
  this parameter, the entire area of the BitmapData object is considered
     changed. This parameter requires Flash Player version 9.0.115.0 or later.</td></tr></table></p><p><span class="label">See also</span></p><div class="seeAlso"><a href="BitmapData.html#lock()" target="">lock()</a><br/><a href="BitmapData.html#setPixel()" target="">setPixel()</a><br/><a href="BitmapData.html#setPixel32()" target="">setPixel32()</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example creates a BitmapData object based on the
          <code>bitmapData</code>
          property of a Bitmap object,
          <code>picture</code>
          .
 It then calls the
          <code>lock()</code>
          method before calling a complicated custom function,
          <code>complexTransformation()</code>
          , that modifies the BitmapData object. (The
          <code>picture</code>
          object
 and the
          <code>complexTransformation()</code>
          function are not defined in this example.) Even if the
          <code>complexTransformation()</code>
          function updates the
          <code>bitmapData</code>
          property of 
 the
          <code>picture</code>
          object, changes are not reflected until the code calls the
          <code>unlock()</code>
          method on the
          <code>bitmapData</code>
          object:
          <div class="listing"><pre>import flash.display.BitmapData;

var bitmapData:BitmapData = picture.bitmapData;
bitmapData.lock();
bitmapData = complexTransformation(bitmapData);
bitmapData.unlock();
picture.bitmapData = bitmapData;</pre></div>
        </div></div><a name="includeExamplesSummary"></a><div class="detailSectionHeader">Examples<span class="usage"><a href="../../ExampleInstruct.html"> How to use examples </a></span></div><div class="exampleHeader">BitmapDataExample.as</div><br/><div class="detailBody">
        The following example uses the class BitmapDataExample to load the
 image Image.gif into a DisplayObject in the default location (0, 0). A copy
 of Image.gif is then placed to the right of the original, which has new colors applied to pixels
 that pass a test using the
        <code>threshold()</code>
        method.
 The task is accomplished using the following steps:
        <ol><li>
            A
            <code>url</code>
            property is created, which is the location and name of the image file
          </li><li>
            The class constructor creates a Loader object, which then instantiates an event listener,
 	which is dispatched when the
            <code>completeHandler()</code>
            method completes the image manipulation.
          </li><li>
            The
            <code>request</code>
            URLRequest object is then passed to
            <code>loader.load()</code>
            , which loads the image
 	into memory by using a display object.
          </li><li>
            The image is then placed on the display list, which displays the image on screen at
 	coordinates
            <i>x = 0, y = 0</i>
            .
          </li><li>
            The
            <code>completeHandler()</code>
            method then does the following:
            <ul><li>Creates a second Loader, along with a Bitmap object, which is initialized with the
 		Loader object.</li><li>
                Creates a second Bitmap object,
                <code>duplicate</code>
                , which in turn calls the
                <code>duplicateImage()</code>
                method, which creates a duplicate of the original image.
              </li><li>
                Creates a BitmapData object that is assigned to the
                <code>duplicate</code>
                object's
 		BitmapData object.
              </li><li>Creates a new Rectangle object initialized with the same coordinates, width, and height
 		as the original image.</li><li>
                Creates a new Point object, which defaults to
                <i>x = 0, y = 0</i>
                .
              </li><li>
                Creates the following variables:
                <ul><li>
                    <code>operation</code>
                    &mdash; Applies the new color when the threshold
 			value is greater than or equal to the original.
                  </li><li>
                    <code>threshold</code>
                    &mdash; The value against which each pixel is compared (in this example,
 			light gray with an alpha of 0xCC).
                  </li><li>
                    <code>color</code>
                    &mdash; The color that the pixels are set to that pass the threshold
 			test, which is solid yellow in this case.
                  </li><li>
                    <code>mask</code>
                    &mdash; The exact opposite of color (transparent blue).
                  </li><li>
                    <code>copySource</code>
                    &mdash; Set to
                    <code>false</code>
                    , indicating the pixel values are 
 			not copied if the threshold value does not pass.  This value has no meaning because
 			the image is duplicated and only pixels that pass the threshold test are changed.
                  </li></ul>
              </li><li>
                Calls the
                <code>threshold()</code>
                method using the preceding variables.  The resulting threshold
 		equation is as follows:
                <code>if (current pixel Value & 0x000000FF) >=
 		(0xCCCCCCCC & 0x000000FF) then set pixel to 0xFFFFFF00</code>
                .
              </li></ul>
          </li></ol>
        
        <p>
          
          <b>Notes:</b>
          
          <ul><li>You will need to compile the SWF file with Local Playback Security set to Access Local Files Only.</li><li>This example requires that a file named Image.gif be placed in the same directory as your SWF file.</li><li>It is recommended that you use an image of up to approximately 80 pixels in width.</li></ul>
          
        </p>
        
        <div class="listing"><pre>package {
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Loader;
    import flash.display.Sprite;
    import flash.events.*;
    import flash.geom.Point;
    import flash.geom.Rectangle;
    import flash.net.URLRequest;

    public class BitmapDataExample extends Sprite {
        private var url:String = "Image.gif";
        private var size:uint = 80;

        public function BitmapDataExample() {
            configureAssets();
        }

        private function configureAssets():void {
            var loader:Loader = new Loader();
            loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
            loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);

            var request:URLRequest = new URLRequest(url);
            loader.x = size * numChildren;
            loader.load(request);
            addChild(loader);
        }

        private function duplicateImage(original:Bitmap):Bitmap {
            var image:Bitmap = new Bitmap(original.bitmapData.clone());
            image.x = size * numChildren;
            addChild(image);
            return image;
        }

        private function completeHandler(event:Event):void {
            var loader:Loader = Loader(event.target.loader);
            var image:Bitmap = Bitmap(loader.content);

            var duplicate:Bitmap = duplicateImage(image);
            var bitmapData:BitmapData = duplicate.bitmapData;
            var sourceRect:Rectangle = new Rectangle(0, 0, bitmapData.width, bitmapData.height);
            var destPoint:Point = new Point();
            var operation:String = "&gt;=";
            var threshold:uint = 0xCCCCCCCC;
            var color:uint = 0xFFFFFF00;
            var mask:uint = 0x000000FF;
            var copySource:Boolean = true;

            bitmapData.threshold(bitmapData,
                                 sourceRect,
                                 destPoint,
                                 operation,
                                 threshold,
                                 color,
                                 mask,
                                 copySource);
        }
        
        private function ioErrorHandler(event:IOErrorEvent):void {
            trace("Unable to load image: " + url);
        }
    }
}</pre></div>
      </div><div class="exampleHeader">BitmapDataExample2.as</div><br/><div class="detailBody"></div><br/><br/><hr><br/><p></p><center class="copyright"> &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  </center><div style="display:none">BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData BitmapData </div><div style="display:none">flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData flash.display.BitmapData </div></div></body></html><!-- &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  -->
