PageRenderTime 46ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/temple/utils/FrameDelay.html

http://github.com/MediaMonks/Temple
HTML | 67 lines | 53 code | 6 blank | 8 comment | 0 complexity | 165f5aeaf26349f0f2df98ecc79fc829 MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><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="FrameDelay,temple.utils.FrameDelay,addEnterFrameListener,create,create,decode,destruct,destruct,destruct,disableSite,doTrace,enableSite,isSiteEnabled,map,pause,removeEnterFrameListener,restart,resume,rootTrace,stackTrace,stop,toString,toString,traceObject,unmap"><title>temple.utils.FrameDelay</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"><!--
  2. asdocTitle = 'FrameDelay - Temple API Documentation';
  3. var baseRef = '../../';
  4. window.onload = configPage;
  5. --></script>
  6. <script type="text/javascript">
  7. scrollToNameAnchor();
  8. </script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Temple API Documentation</td><td class="titleTableTopNav" align="right"><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="../../all-index-A.html" onclick="loadClassListFrame('../../index-list.html')">Index</a>&nbsp;|&nbsp;<a id="framesLink1" href="../../index.html?temple/utils/FrameDelay.html&amp;temple/utils/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">FrameDelay</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</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">
  9. <!--
  10. if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("FrameDelay"); titleBar_setSubNav(false,true,false,false,false,false,false,false,true,true,false ,false,false,false,false,false);}
  11. -->
  12. </script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" 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')">temple.utils</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public final class FrameDelay</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">FrameDelay <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="../../temple/core/CoreObject.html">CoreObject</a> <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> Object</td></tr></table><p></p><p></p>
  13. Delay a function call with one or more frames. Use this when initializing a SWF or a bunch of DisplayObjects, to enable the player to do its thing. Usually a single frame delay will do the job, since the next enterFrame will come when all other jobs are finished.
  14. To execute function 'init' after 1 frame, use:
  15. <p></p><p><a href="#includeExamplesSummary">View the examples</a></p><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 hideInheritedProperty" id="summaryTableProperty"><tr><th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">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="../../temple/core/CoreObject.html#isDestructed" class="signatureLink">isDestructed</a> : Boolean<div class="summaryTableDescription">[read-only]
  16. If an object is destructed, this property is set to true.</div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></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="../../temple/core/CoreObject.html#registryId" class="signatureLink">registryId</a> : uint<div class="summaryTableDescription">[read-only]
  17. The unique identifier of the object.</div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></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 class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#FrameDelay()" class="signatureLink">FrameDelay</a>(callback:Function, frameCount:int = 1, params:Array = null)</div><div class="summaryTableDescription">
  18. Creates a new FrameDelay.</div></td><td class="summaryTableOwnerCol">FrameDelay</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#destruct()" class="signatureLink">destruct</a>():void</div><div class="summaryTableDescription">[override]
  19. Release reference to creating object.</div></td><td class="summaryTableOwnerCol">FrameDelay</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="../../temple/core/CoreObject.html#toString()" class="signatureLink">toString</a>():String</div><div class="summaryTableDescription">
  20. </div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></td></tr></table></div><a name="protectedMethodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Protected Methods </div><div class="showHideLinks"><div id="hideInheritedProtectedMethod" class="hideInheritedProtectedMethod"><a class="showHideLink" href="#protectedMethodSummary" onclick="javascript:setInheritedVisible(false,'ProtectedMethod');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Show Inherited Protected Methods</a></div><div id="showInheritedProtectedMethod" class="showInheritedProtectedMethod"><a class="showHideLink" href="#protectedMethodSummary" onclick="javascript:setInheritedVisible(true,'ProtectedMethod');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Protected Methods</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable hideInheritedProtectedMethod" id="summaryTableProtectedMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class="hideInheritedProtectedMethod"><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="../../temple/core/CoreObject.html#logDebug()" class="signatureLink">logDebug</a>(data:*):void</div><div class="summaryTableDescription">
  21. Does a Log.debug, but has already filled in some known data
  22. </div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></td></tr><tr class="hideInheritedProtectedMethod"><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="../../temple/core/CoreObject.html#logError()" class="signatureLink">logError</a>(data:*):void</div><div class="summaryTableDescription">
  23. Does a Log.error, but has already filled in some known data
  24. </div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></td></tr><tr class="hideInheritedProtectedMethod"><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="../../temple/core/CoreObject.html#logFatal()" class="signatureLink">logFatal</a>(data:*):void</div><div class="summaryTableDescription">
  25. Does a Log.fatal, but has already filled in some known data
  26. </div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></td></tr><tr class="hideInheritedProtectedMethod"><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="../../temple/core/CoreObject.html#logInfo()" class="signatureLink">logInfo</a>(data:*):void</div><div class="summaryTableDescription">
  27. Does a Log.info, but has already filled in some known data
  28. </div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></td></tr><tr class="hideInheritedProtectedMethod"><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="../../temple/core/CoreObject.html#logStatus()" class="signatureLink">logStatus</a>(data:*):void</div><div class="summaryTableDescription">
  29. Does a Log.status, but has already filled in some known data
  30. </div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></td></tr><tr class="hideInheritedProtectedMethod"><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="../../temple/core/CoreObject.html#logWarn()" class="signatureLink">logWarn</a>(data:*):void</div><div class="summaryTableDescription">
  31. Does a Log.warn, but has already filled in some known data
  32. </div></td><td class="summaryTableOwnerCol"><a href="../../temple/core/CoreObject.html">CoreObject</a></td></tr></table></div><script language="javascript" type="text/javascript"><!--
  33. showHideInherited();
  34. --></script><div class="MainContent"><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="FrameDelay()"></a><a name="FrameDelay(Function,int,Array)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">FrameDelay</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function FrameDelay(callback:Function, frameCount:int = 1, params:Array = null)</code><p>
  35. Creates a new FrameDelay. Starts the delay immediately.
  36. </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">callback</span>:Function</code> &mdash; the callback function to be called when done waiting
  37. </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">frameCount</span>:int</code> (default = <code>1</code>)<code></code> &mdash; the number of frames to wait; when left out, or set to 1 or 0, one frame is waited
  38. </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">params</span>:Array</code> (default = <code>null</code>)<code></code> &mdash; list of parameters to pass to the callback function
  39. </td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="destruct()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">destruct</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code>override public function destruct():void</code><p></p><p>
  40. Release reference to creating object.
  41. Use this to remove a FrameDelay object that is still running when the creating object will be removed.
  42. </p></div><a name="includeExamplesSummary"></a><div class="detailSectionHeader">Examples</div><div class="detailBody">
  43. <div class="listing" version="3.0"><pre>
  44. new FrameDelay(init);
  45. </pre></div>
  46. To execute function 'init' after 10 frames, use:
  47. <div class="listing" version="3.0"><pre>
  48. new FrameDelay(init, 10);
  49. </pre></div>
  50. To call function 'setProps' with parameters, executed after 1 frame:
  51. <div class="listing" version="3.0"><pre>
  52. new FrameDelay(setProps, 1, [shape, 'alpha', 0]);
  53. </pre></div>
  54. <div class="listing" version="3.0"><pre>
  55. private function setProps (shape:Shape, property:String, value:Number):void
  56. {
  57. shape[property] = value;
  58. }
  59. </pre></div>
  60. </div><br/><br/><hr><br/><p></p><center class="copyright"><footer> </footer><br/> </center></div></body></html><!-- <br/> -->