PageRenderTime 53ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/temple/utils/types/FunctionUtils.html

http://templelibrary.googlecode.com/
HTML | 69 lines | 45 code | 14 blank | 10 comment | 0 complexity | 43080fc0c673d733d4d71324fc5e0b40 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="FunctionUtils,temple.utils.types.FunctionUtils,addAll,addElements,addLabelScript,addLabelScriptEnd,afterFirst,afterLast,age,ageCheck,align,angle,applyFilters,areEqual,areEqual,average,beforeFirst,beforeLast,beginsWith,between,block,capitalize,ceilToPrecision,centerOnStage,centerToRectangle,clampPosNeg,cleanSpecialChars,clearCache,clearContent,clone,clone,clone,compareDates,contains,convertToDate,convertToString,convertTransformMatrix,copy,copy,copy,countDays,countOf,countWords,createUniqueCopy,crop,deepArrayClone,deepGotoAndPlay,deepGotoAndStop,deepNextFrame,deepPlay,deepStop,dumpLabels,editDistance,embedFontsInTextFields,emptyTextFields,endsWith,escapeToUnicode,escapeToUnicodeChar,filledLength,findChildOfType,findChildrenOfType,fitToLines,flattenHeight,flattenWidth,floorToPrecision,format,format,formatTextFields,functionToString,fuzzyEquals,garbageCollect,getAMPM,getAmPm,getBoolean,getBooleanAlt,getCenter,getChildren,getClass,getDayOfYear,getDaysOfMonth,getDescendantByNames,getDisplayObject,getFontSize,getFrameForLabel,getHoursIn12HourFormat,getInfo,getIso8601,getKeys,getLabel,getLastFrameOfSection,getMonthAsText,getMonthName,getMovieClip,getNearestRotationIndex,getNextInWeekDateFor,getNumberFromString,getProperties,getRfc2822,getScaledBitmap,getShortHour,getShortMonthName,getShortYear,getStageBottom,getStageLeft,getStageRight,getStageTop,getTextField,getUniqueFirst,getUnixTimestamp,getValueAlt,getValues,getVisibleBounds,getVisibleHeight,getVisibleWidth,getWeekDay,getWeekDayAsText,getWeekOfYear,hasDescendant,hasDescendantByNames,hasKeys,hasLabel,hasLabels,hasSimpleConstructor,hasText,hasValues,ignoreWhiteSpace,inArray,inArrayField,init,interpolate,intersect,isApplicationRoot,isDynamic,isEmpty,isLeapYear,isMultiTypeOf,isNumeric,isPrimitive,isSameDay,isSummertime,isTypeOf,isTypeOfMulti,isVector,length,localToLocal,ltrim,mimicTransformMatrix,mouseChildren,moveToContainer,newCentered,normalizedValue,numericQName,opaqueBitmap,ordinalSuffix,padLeft,padRight,parseFromSqlDateTime,parseHyperlinks,parseRfc2822,parseW3CDTF,play,playBackwards,pregMatch,pregMatchAll,properCase,quote,randomElement,randomElement,randomInRange,remove,removeAll,removeEmptyElements,removeExtraWhitespace,removeValueFromArray,removeValueFromArrayOnce,removeValueFromVector,removeWord,removeWords,reparent,reparentAt,repeat,replace,replaceHTML,replaceVars,resetScaling,resizeAndMaintainAspectRatio,reverse,reverseWords,rol,ror,roundDown,roundDownToNearest,roundToNearest,roundToPrecision,roundUp,roundUpToNearest,rtrim,setCenter,setDutch,setFont,setFontSize,setToBounds,shuffle,shuffle,similarity,simpleJoin,simpleJoin,simpleJoinS,sortOn,splitElements,splitMultiSeperator,stop,stringsAreEqual,stripTags,swapCase,timeCodeToUTC,toArray,toDynamic,toHex,toMatrix,toSqlDateTime,toW3CDTF,traceObject,trim,trimAll,trimAllFilter,trimTextFieldHTMLText,trimTextFieldText,truncate,ucFirst,usesStyleSheet,usesTextFormat,wait,xPosOnSinus"><title>temple.utils.types.FunctionUtils</title></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 = 'FunctionUtils - 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 - 3.0.2</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/types/FunctionUtils.html&amp;temple/utils/types/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">FunctionUtils</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#methodSummary">Methods</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("FunctionUtils"); titleBar_setSubNav(false,false,false,false,false,false,false,false,true,false,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.types</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public final class FunctionUtils</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">FunctionUtils <img src="../../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> Object</td></tr></table><p></p><p></p>
  13. This class contains some utilities for Functions.
  14. <p></p><br/><hr></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </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="#functionToString()" class="signatureLink">functionToString</a>(func:Function):String</div><div class="summaryTableDescription">[static]
  15. Converts a function to a readable string.</div></td><td class="summaryTableOwnerCol">FunctionUtils</td></tr></table></div><script language="javascript" type="text/javascript"><!--
  16. showHideInherited();
  17. --></script><div class="MainContent"><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="functionToString()"></a><a name="functionToString(Function)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">functionToString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public static function functionToString(func:Function):String</code><p></p><p>
  18. Converts a function to a readable string.
  19. Note: only works in the debug player.
  20. </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">func</span>:Function</code></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>String</code></td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
  21. <a></a>
  22. <p>This is an example of the <a href="http://templelibrary.googlecode.com/svn/trunk/modules/utils/doc/temple/utils/types/FunctionUtils.html" target="">FunctionUtils</a>.</p>
  23. <p>This example uses Yalala to log debug information. Go to <a href="http://yalala.tyz.nl" target="external">http://yalala.tyz.nl</a> to view the debug messages.</p>
  24. <p><a href="http://templelibrary.googlecode.com/svn/trunk/modules/utils/examples/temple/utils/types/FunctionUtilsExample.swf" target="external">View this example</a></p>
  25. <p><a href="http://templelibrary.googlecode.com/svn/trunk/modules/utils/examples/temple/utils/types/FunctionUtilsExample.as" target="external">View source</a></p>
  26. <div class="listing"><pre>
  27. package
  28. {
  29. import temple.utils.types.FunctionUtils;
  30. import flash.display.MovieClip;
  31. // This class extends the DocumentClassExample, which handles some default Temple settings. This class can be found in directory '/examples/templates/'
  32. public class FunctionUtilsExample extends DocumentClassExample
  33. {
  34. public function FunctionUtilsExample()
  35. {
  36. // The super class connects to Yalog, so you can see all log message at: http://yalala.tyz.nl/
  37. super("Temple - FunctionUtilsExample");
  38. log(myPrivateFunction); // function Function() {}
  39. // private function
  40. log(FunctionUtils.functionToString(myPrivateFunction)); // FunctionUtilsExample.myPrivateFunction()
  41. // static function
  42. log(FunctionUtils.functionToString(FunctionUtils.functionToString)); // FunctionUtils.functionToString()
  43. // method
  44. log(FunctionUtils.functionToString(new MovieClip().gotoAndPlay)); // MovieClip.gotoAndPlay()
  45. }
  46. private function myPrivateFunction():void
  47. {
  48. }
  49. }
  50. }
  51. </pre></div><script language="javascript" type="text/javascript"><!-- AC_FL_RunContent( "src", "FunctionUtilsExample", "width", "100%",
  52. "height","400px", "salign", "TL", "id", "example1", "quality", "high", "bgcolor", "", "name",
  53. "example1", "flashvars","", "allowScriptAccess","sameDomain", "type",
  54. "application/x-shockwave-flash","pluginspage", "http://www.macromedia.com/go/getflashplayer" ); --></script></div></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>by MediaMonks | http://www.mediamonks.com</footer><br/> </center></div></body></html><!--by MediaMonks | http://www.mediamonks.com<br/> -->