<?xml version="1.0"?>
<apiPackage id="flash.sampler"><apiName>flash.sampler</apiName><apiDetail/><apiClassifier id="flash.sampler:StackFrame"><apiName>StackFrame</apiName><shortdesc>
     The StackFrame class provides access to the properties of a data block
     containing a function.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>StackFrame      
     </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
     The StackFrame class provides access to the properties of a data block
     containing a function. For Flash Player debugger version only.
     </apiDesc></apiClassifierDetail><apiOperation id="flash.sampler:StackFrame:toString"><apiName>toString</apiName><shortdesc>
     Converts the StackFrame to a string of its properties.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>StackFrame.toString, toString      
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string containing the <codeph>name</codeph> property, and optionally the <codeph>file</codeph> 
     and <codeph>line</codeph> properties (if a SWF file is being debugged) of the StackFrame object. For Flash Player debugger version only.
     </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
     Converts the StackFrame to a string of its properties.
     </apiDesc></apiOperationDetail></apiOperation><apiValue id="flash.sampler:StackFrame:file"><apiName>file</apiName><shortdesc>
     The file name of the SWF file being debugged.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>StackFrame.file, file      
     </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
     The file name of the SWF file being debugged. For Flash Player debugger version only.
     </apiDesc></apiValueDetail></apiValue><apiValue id="flash.sampler:StackFrame:line"><apiName>line</apiName><shortdesc>
     The line number for the function in the SWF file being debugged.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>StackFrame.line, line      
     </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
     The line number for the function in the SWF file being debugged. For Flash Player debugger version only.
     </apiDesc></apiValueDetail></apiValue><apiValue id="flash.sampler:StackFrame:name"><apiName>name</apiName><shortdesc>
     The function name in the stack frame.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>StackFrame.name, name      
     </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
     The function name in the stack frame. For Flash Player debugger version only.
     </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="flash.sampler:NewObjectSample"><apiName>NewObjectSample</apiName><shortdesc>
    The NewObjectSample class represents objects that are created within a getSamples() stream.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>NewObjectSample 
    </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>flash.sampler:Sample</apiBaseClassifier></apiClassifierDef><apiDesc>
    The NewObjectSample class represents objects that are created within a <codeph>getSamples()</codeph> stream.
    For Flash Player debugger version only.
    </apiDesc><example conref="examples\SampleTypesExample.as"> The following example uses the <codeph>stack</codeph> and <codeph>time</codeph> properties of a Sample object
 <codeph>s</codeph> to collect memory samples. The samples contain NewObjectSample objects (the 
 <codeph>newSamples</codeph> array), DeleteObjectSample objects (the <codeph>delSamples</codeph> array), and CPU memory sample
 objects (the <codeph>cpuSamples</codeph> array). To use
 the memory profiler, you need to have Flash Player debugger version 9.0.115.0 or later installed.
<codeblock>
package 
{
    import flash.sampler.*
    import flash.system.*
    import flash.utils.*
    import flash.display.Sprite
    public class sampleTypes extends Sprite
    {
      var b:Boolean = true
        public function sampleTypes() {
            flash.sampler.startSampling();
            for(var i:int=0;i&lt;10000;i++)
              new Object();

            var cpuSamples:Array=[];
            var newSamples:Array=[];
            var delSamples:Array=[];
            var ids:Array=[]

            var lastTime:Number=0;
            for each(var s:Sample in getSamples()) {
              
              assert(s.time &gt; 0); // positive
              assert(Math.floor(s.time) == s.time, s.time); // integral
              assert(s.time &gt;= lastTime, s.time + ":" + lastTime); // ascending
              assert(s.stack == null || s.stack is Array)
              if(s.stack) {
                assert(s.stack[0] is StackFrame);
                assert(s.stack[0].name is String);
            }
              
              if(s is NewObjectSample) {
                var nos = NewObjectSample(s);
                assert(s.id &gt; 0, s.id);
                assert(s.type is Class, getQualifiedClassName(s.type));
                newSamples.push(s);
                ids[s.id] = "got one";
              } else if(s is DeleteObjectSample) {
                var dos = DeleteObjectSample(s);
                delSamples.push(s);
                assert(ids[dos.id] == "got one");
              } else if(s is Sample)
                cpuSamples.push(s);
              else {
                assert(false);
              }
              lastTime = s.time;
            }

            trace(b)
            trace(newSamples.length &gt; 0)
            trace(cpuSamples.length &gt; 0)
            trace(delSamples.length &gt; 0)

        }

        private function assert(e:Boolean, mess:String=null):void {
          b = e &amp;&amp; b;
          if(true &amp;&amp; !e) {
            if(mess) trace(mess);
            trace(new Error().getStackTrace());
          }     
        }         
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="package.html#getSamples()"><linktext>flash.sampler.getSamples()</linktext></link></related-links><apiValue id="flash.sampler:NewObjectSample:type"><apiName>type</apiName><shortdesc>
         The Class object corresponding to the object created within a getSamples() stream.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>NewObjectSample, NewObjectSample.type, type 
    	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Class</apiValueClassifier></apiValueDef><apiDesc>
         The Class object corresponding to the object created within a <codeph>getSamples()</codeph> stream.
         For Flash Player debugger version only.
         </apiDesc></apiValueDetail></apiValue><apiValue id="flash.sampler:NewObjectSample:object:get"><apiName>object</apiName><shortdesc>
    	 The NewObjectSample object if it still exists.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>NewObjectSample, NewObjectSample.object, object 
         </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiType value="any"/></apiValueDef><apiDesc>
    	 The NewObjectSample object if it still exists. If the object has been garbage collected, this property is
    	 undefined and a corresponding DeleteObjectSample exists. For Flash Player debugger version only.
         </apiDesc></apiValueDetail><related-links><link href="flash.sampler.xml#DeleteObjectSample"><linktext>flash.sampler.DeleteObjectSample</linktext></link></related-links></apiValue></apiClassifier><apiOperation id="globalOperation:flash.sampler:clearSamples"><apiName>clearSamples</apiName><shortdesc>
     Clears the current set of Sample objects.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>clearSamples      
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
     Clears the current set of Sample objects. This method is usually called after calling <codeph>getSamples()</codeph>
     and iterating over the Sample objects.
     For Flash Player debugger version only.
     </apiDesc></apiOperationDetail><related-links><link href="package.html#getSamples()"><linktext>getSamples()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:getGetterInvocationCount"><apiName>getGetterInvocationCount</apiName><shortdesc>
     Returns the number of times a get function was executed.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>getInvocationCount   
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The number of times a get method was executed.
     </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>obj</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>A method instance or a class.
     </apiDesc></apiParam><apiParam><apiItemName>qname</apiItemName><apiOperationClassifier>QName</apiOperationClassifier><apiDesc>If qname is <codeph>undefined</codeph> return the number of iterations of the constructor function.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Returns the number of times a get function was executed. Use 
     <codeph>isGetterSetter()</codeph> to verify that you have a get/set function before you use
     <codeph>getGetterInvocationCount()</codeph>. For Flash Player debugger version only.
     </apiDesc></apiOperationDetail><related-links><link href="package.html#isGetterSetter()"><linktext>isGetterSetter()</linktext></link><link href="package.html#getInvocationCount()"><linktext>getInvocationCount()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:getInvocationCount"><apiName>getInvocationCount</apiName><shortdesc>
     Returns the number of times a method was executed.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>getInvocationCount     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The number of times a method was executed.
     </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>obj</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>A method instance or a class. A class can be used to get the invocation count of 
     instance functions when a method instance isn't available. If <codeph>obj</codeph> is <codeph>undefined</codeph>,
     this method returns the count of the package-scoped function named by <codeph>qname</codeph>.
     </apiDesc></apiParam><apiParam><apiItemName>qname</apiItemName><apiOperationClassifier>QName</apiOperationClassifier><apiDesc>If qname is <codeph>undefined</codeph> return the number of iterations of the constructor function.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Returns the number of times a method was executed. If the parameter <codeph>obj</codeph>
     is a Class and the parameter <codeph>qname</codeph> is <codeph>undefined</codeph> then this method
     returns the number of iterations of the constructor function. For Flash Player debugger version only.
     </apiDesc><example conref="examples\GetInvocationCountExample.as"> 
<codeblock>
 package 
{
  public function exec3() {}

  import flash.sampler.*;
  import flash.system.*;
  import flash.display.Sprite;
  import flash.utils.*;
  public class getInvocationCountTest extends Sprite
    {
      public function getInvocationCountTest()
    {
      for(var i:int=0;i&lt;10;i++)
        exec();
      for(var i:int=0;i&lt;10;i++)
        exec2();
      for(var i:int=0;i&lt;10;i++)
        exec3();

      // get exec QName
      var execName:QName;
          var name:QName;
      var fooName:QName;
      for each(name in getMemberNames(this)) {
          if(name.localName == "exec")
          execName = name;
          if(name.localName == "foo")
          fooName = name;
      }

      var exec2Name:QName;
      for each(name in getMemberNames(getInvocationCountTest)) {
          if(name.localName == "exec2")
          exec2Name = name;
      }

      // execute get/set
      foo = "bar";

      trace(isGetterSetter(this, fooName));
      trace(getSetterInvocationCount(this, fooName) == 1);
      trace(getGetterInvocationCount(this, fooName) == 0);

      foo;
      
      trace(getSetterInvocationCount(getInvocationCountTest, fooName) == 1);
      trace(getGetterInvocationCount(getInvocationCountTest, fooName) == 1);

      trace(getInvocationCount(this, execName) == 10);
      trace(getInvocationCount(getInvocationCountTest, execName) == 10);
      trace(getInvocationCount(getInvocationCountTest, exec2Name) == 10);
      trace(getInvocationCount(getInvocationCountTest, undefined) == 1);
    
      getTimer();
      getTimer();

      trace(getInvocationCount(undefined, new QName("", "trace")) == 9);
      trace(getInvocationCount(undefined, new QName("flash.utils", "getTimer")) == 2);
      trace(getInvocationCount(undefined, new QName("", "exec3")) == 10);

    }

      private function exec():void {}
      private static function exec2():void {}

      private function get foo():String { return "fo"; }
      private function set foo(s:String) { }
      
    }
}
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="globalOperation:flash.sampler:getMemberNames"><apiName>getMemberNames</apiName><shortdesc>
     Returns an object containing all members of a specified object, including private members.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>getMemberNames
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An Object that you must iterate over with a <codeph>for each..in</codeph> loop to retrieve the QNames for
     each property. 
     </apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn><apiParam><apiItemName>o</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The object to analyze.
     </apiDesc></apiParam><apiParam><apiItemName>instanceNames</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc>If object is a Class and instanceNames is true report the instance names as if o was an instance of class instead of the class's member names.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Returns an object containing all members of a specified object, including private members. You can then 
     iterate over the returned object to see all values. This method is similar to the flash.utils.describeType() 
     method but also allows you to see private members and skips the intermediate step of creating an XML object.
     For Flash Player debugger version only.
     
     </apiDesc><example conref="examples\GetMemberNamesExample.as"> The following example uses the <codeph>getMemberNames()</codeph> method to analyze an  
 object and display the <codeph>buttonMode</codeph>, <codeph>filters</codeph> and <codeph>dispatchEvent</codeph> 
 properties of its members, To use
 the memory profiler, you need to have Flash Player debugger version 9.0.115.0 or later installed.
<codeblock>
 package 
{
  import flash.sampler.*;
  import flash.system.*;
  import flash.display.Sprite;
  public class getMemberNamesTest extends Sprite
    {
      public function getMemberNamesTest()
    {
      var name_iter = getMemberNames(this);
      var o={};
      for each(var name:QName in name_iter) {
        o[name.localName] = "got it";
      }

      name_iter = getMemberNames(this);
      var count=0;
      for(var dum in name_iter) {
        count++;
      }
      trace(count == 1);

      // my member
      trace("buttonMode" in o);
      // inherited member
      trace("filters" in o);
      // inherited function
      trace("dispatchEvent" in o);

      var name_iter = getMemberNames(getMemberNamesTest, true);
      var o={};
      for each(var name:QName in name_iter) {
        o[name.localName] = "got it";
      }

      // my member
      trace("buttonMode" in o);
      // inherited member
      trace("filters" in o);
      // inherited function
      trace("dispatchEvent" in o);

    }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.utils.xml#/describeType()"><linktext>flash.utils.describeType()</linktext></link><link href="../../statements.html#for_each..in"><linktext>for each..in</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:getSampleCount"><apiName>getSampleCount</apiName><shortdesc> 
     Returns the number of samples collected.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>getSampleCount     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An iterator of Sample instances.
     </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc> 
     Returns the number of samples collected. For Flash Player debugger version only.
     
     </apiDesc></apiOperationDetail><related-links><link href="flash.sampler.xml#Sample"><linktext>flash.sampler.Sample</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:getSamples"><apiName>getSamples</apiName><shortdesc>
     Returns an object of memory usage Sample instances from the last sampling session.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>getSamples     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An iterator of Sample instances.
     </apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
     Returns an object of memory usage Sample instances from the last sampling session. For Flash Player debugger version only.
     
     </apiDesc></apiOperationDetail><related-links><link href="flash.sampler.xml#Sample"><linktext>flash.sampler.Sample</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:getSetterInvocationCount"><apiName>getSetterInvocationCount</apiName><shortdesc>
     Returns the number of times a set function was executed.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>getInvocationCount   
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The number of times a set method was executed.
     </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>obj</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>A method instance or a class.
     </apiDesc></apiParam><apiParam><apiItemName>qname</apiItemName><apiOperationClassifier>QName</apiOperationClassifier><apiDesc>If qname is <codeph>undefined</codeph> return the number of iterations of the constructor function.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Returns the number of times a set function was executed. Use 
     <codeph>isGetterSetter()</codeph> to verify that you have a get/set function before you use
     <codeph>getSetterInvocationCount()</codeph>. For Flash Player debugger version only.
     </apiDesc></apiOperationDetail><related-links><link href="package.html#isGetterSetter()"><linktext>isGetterSetter()</linktext></link><link href="package.html#getInvocationCount()"><linktext>getInvocationCount()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:getSize"><apiName>getSize</apiName><shortdesc>
	Returns the size in memory of a specified object when used with the Flash Player 9.0.115.0 or later debugger version.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>getSize      
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The byte count of memory used by the specified object.
    </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>o</apiItemName><apiType value=""/><apiDesc>The object to analyze for memory usage.
    </apiDesc></apiParam></apiOperationDef><apiDesc>
	Returns the size in memory of a specified object when used with the Flash Player 9.0.115.0 or later debugger version. If 
    used with a Flash Player that is not the debugger version, this method returns <codeph>0</codeph>.
    </apiDesc><example conref="examples\DeletedObjectSizeExample.as"> The following example uses <codeph>startSampling()</codeph> and <codeph>pauseSampling</codeph> to collect
 Sample objects. The example then iterates over the Sample objects for <codeph>id</codeph> values and
 sizes. After calling <codeph>System.gc()</codeph> to stop the current process, the example compares the deletedObjectSample
 objects to the original  <codeph>id</codeph> values and displays their size. To use
 the memory profiler, you need to have Flash Player debugger version 9.0.115.0 or later installed.
<codeblock>
 package {
  import flash.sampler.*;
  import flash.system.*;
  import flash.display.Sprite;
  import flash.utils.Dictionary;
  public class deletedObjectSize extends Sprite {
    public function deletedObjectSize() {

      startSampling();
      var obj = {};
      pauseSampling();

      var id:Number;
      var sampleIter = getSamples();
      for each(var s:Sample in sampleIter) {
    id = s.id;
      }
      
      sampleIter = getSamples();
      var count=0;
      for(var dum in sampleIter) {
    count++;
      }
      trace(count == 1);

      var size:Number = getSize(obj);
      obj = undefined;

      startSampling();

      // force DRC
      for(var i:int=0;i&lt;1000;i++)
    new Object();
      
      System.gc();

      pauseSampling();
      
      var sampleIter = getSamples();
      for each(var s:Sample in sampleIter) {
    //    trace(s);
    if(s is DeleteObjectSample &amp;&amp; s.id == id) {
      trace(s.size == size);
    }      
      }       

    }
  }
}
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="globalOperation:flash.sampler:isGetterSetter"><apiName>isGetterSetter</apiName><shortdesc>
     Checks to see if a property is defined by a get/set function.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>getInvocationCount   
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A Boolean value indicating if the property is defined by a get/set function (<codeph>true</codeph>)
     or not (<codeph>false</codeph>).
     </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>obj</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>A method instance or a class.
     </apiDesc></apiParam><apiParam><apiItemName>qname</apiItemName><apiOperationClassifier>QName</apiOperationClassifier><apiDesc>If qname is <codeph>undefined</codeph> return the number of iterations of the constructor function.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Checks to see if a property is defined by a get/set function. If you want to use 
     <codeph>getInvocationCount()</codeph> on a get/set function for a property,
     first call <codeph>isGetterSetter()</codeph> to check to see if it is a get/set function,
     and then use either <codeph>getSetterInvocationCount</codeph>
     or <codeph>getGetterInvocationCount</codeph> to get the respective counts. For Flash Player debugger version only.
     </apiDesc><example conref="examples\GetInvocationCountExample.as"> 
<codeblock>
 package 
{
  public function exec3() {}

  import flash.sampler.*;
  import flash.system.*;
  import flash.display.Sprite;
  import flash.utils.*;
  public class getInvocationCountTest extends Sprite
    {
      public function getInvocationCountTest()
    {
      for(var i:int=0;i&lt;10;i++)
        exec();
      for(var i:int=0;i&lt;10;i++)
        exec2();
      for(var i:int=0;i&lt;10;i++)
        exec3();

      // get exec QName
      var execName:QName;
          var name:QName;
      var fooName:QName;
      for each(name in getMemberNames(this)) {
          if(name.localName == "exec")
          execName = name;
          if(name.localName == "foo")
          fooName = name;
      }

      var exec2Name:QName;
      for each(name in getMemberNames(getInvocationCountTest)) {
          if(name.localName == "exec2")
          exec2Name = name;
      }

      // execute get/set
      foo = "bar";

      trace(isGetterSetter(this, fooName));
      trace(getSetterInvocationCount(this, fooName) == 1);
      trace(getGetterInvocationCount(this, fooName) == 0);

      foo;
      
      trace(getSetterInvocationCount(getInvocationCountTest, fooName) == 1);
      trace(getGetterInvocationCount(getInvocationCountTest, fooName) == 1);

      trace(getInvocationCount(this, execName) == 10);
      trace(getInvocationCount(getInvocationCountTest, execName) == 10);
      trace(getInvocationCount(getInvocationCountTest, exec2Name) == 10);
      trace(getInvocationCount(getInvocationCountTest, undefined) == 1);
    
      getTimer();
      getTimer();

      trace(getInvocationCount(undefined, new QName("", "trace")) == 9);
      trace(getInvocationCount(undefined, new QName("flash.utils", "getTimer")) == 2);
      trace(getInvocationCount(undefined, new QName("", "exec3")) == 10);

    }

      private function exec():void {}
      private static function exec2():void {}

      private function get foo():String { return "fo"; }
      private function set foo(s:String) { }
      
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="package.html#getInvocationCount()"><linktext>getInvocationCount()</linktext></link><link href="package.html#getSetterInvocationCount()"><linktext>getSetterInvocationCount()</linktext></link><link href="package.html#getGetterInvocationCount()"><linktext>getGetterInvocationCount()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:pauseSampling"><apiName>pauseSampling</apiName><shortdesc>
     Stops the sampling process momentarily.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>pauseSampling      
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
     Stops the sampling process momentarily. Restart the sampling process using <codeph>startSampling()</codeph>.
     For Flash Player debugger version only.
     </apiDesc></apiOperationDetail><related-links><link href="package.html#startSampling()"><linktext>startSampling()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:startSampling"><apiName>startSampling</apiName><shortdesc>
     Begins the process of collecting memory usage Sample objects.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>startSampling      
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
     Begins the process of collecting memory usage Sample objects.
     For Flash Player debugger version only.
     </apiDesc><example conref="examples\StartSamplingExample.as"> The following example initiates the sampling process and iterates over the collected objects. To use
 the memory profiler, you need to have Flash Player debugger version 9.0.115.0 or later.
<codeblock>
package 
{
    import flash.sampler.*
    import flash.system.*
    import flash.display.Sprite
    public class startSampling extends Sprite
    {
        public function startSampling()
        {
            flash.sampler.startSampling();
            for(var i:int=0;i&lt;1000;i++)
                new Object()
            trace(getSampleCount() &gt; 0)
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="flash.sampler.xml#Sample"><linktext>Sample class</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:flash.sampler:stopSampling"><apiName>stopSampling</apiName><shortdesc>
	 Ends the process of collecting memory usage Sample objects and frees resources dedicated to the sampling process.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>stopSampling      
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn></apiOperationDef><apiDesc>
	 Ends the process of collecting memory usage Sample objects and frees resources dedicated to the sampling process.
     You start the sampling process with <codeph>startSampling()</codeph>.
     For Flash Player debugger version only.
     </apiDesc></apiOperationDetail><related-links><link href="flash.sampler.xml#Sample"><linktext>Sample class</linktext></link></related-links></apiOperation><apiClassifier id="flash.sampler:Sample"><apiName>Sample</apiName><shortdesc>
     The Sample class creates objects that hold memory analysis information over distinct durations.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>Sample      
     </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
     The Sample class creates objects that hold memory analysis information over distinct durations.
     For Flash Player debugger version only.
     
     </apiDesc><example conref="examples\SampleTypesExample.as"> The following example uses the <codeph>stack</codeph> and <codeph>time</codeph> properties of a Sample object
 <codeph>s</codeph> to collect memory samples. The samples contain NewObjectSample objects (the 
 <codeph>newSamples</codeph> array), DeleteObjectSample objects (the <codeph>delSamples</codeph> array), and CPU memory sample
 objects (the <codeph>cpuSamples</codeph> array). To use
 the memory profiler, you need to have Flash Player debugger version 9.0.115.0 or later installed.
<codeblock>
package 
{
    import flash.sampler.*
    import flash.system.*
    import flash.utils.*
    import flash.display.Sprite
    public class sampleTypes extends Sprite
    {
      var b:Boolean = true
        public function sampleTypes() {
            flash.sampler.startSampling();
            for(var i:int=0;i&lt;10000;i++)
              new Object();

            var cpuSamples:Array=[];
            var newSamples:Array=[];
            var delSamples:Array=[];
            var ids:Array=[]

            var lastTime:Number=0;
            for each(var s:Sample in getSamples()) {
              
              assert(s.time &gt; 0); // positive
              assert(Math.floor(s.time) == s.time, s.time); // integral
              assert(s.time &gt;= lastTime, s.time + ":" + lastTime); // ascending
              assert(s.stack == null || s.stack is Array)
              if(s.stack) {
                assert(s.stack[0] is StackFrame);
                assert(s.stack[0].name is String);
            }
              
              if(s is NewObjectSample) {
                var nos = NewObjectSample(s);
                assert(s.id &gt; 0, s.id);
                assert(s.type is Class, getQualifiedClassName(s.type));
                newSamples.push(s);
                ids[s.id] = "got one";
              } else if(s is DeleteObjectSample) {
                var dos = DeleteObjectSample(s);
                delSamples.push(s);
                assert(ids[dos.id] == "got one");
              } else if(s is Sample)
                cpuSamples.push(s);
              else {
                assert(false);
              }
              lastTime = s.time;
            }

            trace(b)
            trace(newSamples.length &gt; 0)
            trace(cpuSamples.length &gt; 0)
            trace(delSamples.length &gt; 0)

        }

        private function assert(e:Boolean, mess:String=null):void {
          b = e &amp;&amp; b;
          if(true &amp;&amp; !e) {
            if(mess) trace(mess);
            trace(new Error().getStackTrace());
          }     
        }         
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="package.html#getSamples()"><linktext>flash.sampler.getSamples()</linktext></link></related-links><apiValue id="flash.sampler:Sample:stack"><apiName>stack</apiName><shortdesc>
		 Contains information about the methods executed by Flash Player over a specified period of time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>Sample, Sample.stack, stack     
		 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Array</apiValueClassifier></apiValueDef><apiDesc>
		 Contains information about the methods executed by Flash Player over a specified period of time. The format for the 
	     stack trace is similiar to the content shown in the exception dialog box of the Flash Player debugger version.
         For Flash Player debugger version only.
         </apiDesc></apiValueDetail></apiValue><apiValue id="flash.sampler:Sample:time"><apiName>time</apiName><shortdesc>
	     The microseconds that define the duration of the Sample instance.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>Sample, Sample.time, time         
		 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	     The microseconds that define the duration of the Sample instance. For Flash Player debugger version only.
             
             </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="flash.sampler:DeleteObjectSample"><apiName>DeleteObjectSample</apiName><shortdesc>
    The DeleteObjectSample class represents objects that are created within a getSamples() stream; each
    DeleteObjectSample object corresponds to a NewObjectSample object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>DeleteObjectSample 
    </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>flash.sampler:Sample</apiBaseClassifier></apiClassifierDef><apiDesc>
    The DeleteObjectSample class represents objects that are created within a <codeph>getSamples()</codeph> stream; each
    DeleteObjectSample object corresponds to a NewObjectSample object. For Flash Player debugger version only.
    </apiDesc><example conref="examples\SampleTypesExample.as"> The following example uses the <codeph>stack</codeph> and <codeph>time</codeph> properties of a Sample object
 <codeph>s</codeph> to collect memory samples. The samples contain NewObjectSample objects (the 
 <codeph>newSamples</codeph> array), DeleteObjectSample objects (the <codeph>delSamples</codeph> array), and CPU memory sample
 objects (the <codeph>cpuSamples</codeph> array). To use
 the memory profiler, you need to have Flash Player debugger version 9.0.115.0 or later installed.
<codeblock>
package 
{
    import flash.sampler.*
    import flash.system.*
    import flash.utils.*
    import flash.display.Sprite
    public class sampleTypes extends Sprite
    {
      var b:Boolean = true
        public function sampleTypes() {
            flash.sampler.startSampling();
            for(var i:int=0;i&lt;10000;i++)
              new Object();

            var cpuSamples:Array=[];
            var newSamples:Array=[];
            var delSamples:Array=[];
            var ids:Array=[]

            var lastTime:Number=0;
            for each(var s:Sample in getSamples()) {
              
              assert(s.time &gt; 0); // positive
              assert(Math.floor(s.time) == s.time, s.time); // integral
              assert(s.time &gt;= lastTime, s.time + ":" + lastTime); // ascending
              assert(s.stack == null || s.stack is Array)
              if(s.stack) {
                assert(s.stack[0] is StackFrame);
                assert(s.stack[0].name is String);
            }
              
              if(s is NewObjectSample) {
                var nos = NewObjectSample(s);
                assert(s.id &gt; 0, s.id);
                assert(s.type is Class, getQualifiedClassName(s.type));
                newSamples.push(s);
                ids[s.id] = "got one";
              } else if(s is DeleteObjectSample) {
                var dos = DeleteObjectSample(s);
                delSamples.push(s);
                assert(ids[dos.id] == "got one");
              } else if(s is Sample)
                cpuSamples.push(s);
              else {
                assert(false);
              }
              lastTime = s.time;
            }

            trace(b)
            trace(newSamples.length &gt; 0)
            trace(cpuSamples.length &gt; 0)
            trace(delSamples.length &gt; 0)

        }

        private function assert(e:Boolean, mess:String=null):void {
          b = e &amp;&amp; b;
          if(true &amp;&amp; !e) {
            if(mess) trace(mess);
            trace(new Error().getStackTrace());
          }     
        }         
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="package.html#getSamples()"><linktext>flash.sampler.getSamples()</linktext></link></related-links><apiValue id="flash.sampler:DeleteObjectSample:id"><apiName>id</apiName><shortdesc> 
         The unique identification number that matches up with a NewObjectSample's identification number.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>DeleteObjectSample, DeleteObjectSample.id, id  
         </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc> 
         The unique identification number that matches up with a NewObjectSample's identification number.
         For Flash Player debugger version only.
         </apiDesc></apiValueDetail><related-links><link href="flash.sampler.xml#NewObjectSample/id"><linktext>flash.sampler.NewObjectSample.id</linktext></link></related-links></apiValue><apiValue id="flash.sampler:DeleteObjectSample:size"><apiName>size</apiName><shortdesc>
         The size of the DeleteObjectSample object before it is deleted.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9.0.115.0"/></apiVersion></asMetadata><asCustoms><keyword>DeleteObjectSample, DeleteObjectSample.size, size  
         </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
         The size of the DeleteObjectSample object before it is deleted. For Flash Player debugger version only.
         </apiDesc></apiValueDetail><related-links><link href="flash.sampler.xml#NewObjectSample/id"><linktext>flash.sampler.NewObjectSample.id</linktext></link></related-links></apiValue></apiClassifier></apiPackage>