| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
|---|
| 2 |
<html> |
|---|
| 3 |
<head> |
|---|
| 4 |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|---|
| 5 |
<link rel="stylesheet" href="../style.css" type="text/css" media="screen"> |
|---|
| 6 |
<link rel="stylesheet" href="../print.css" type="text/css" media="print"> |
|---|
| 7 |
<meta content="Command,commands.Command,_function,_params,_thisObject,execute" name="keywords"> |
|---|
| 8 |
<title>commands.Command</title> |
|---|
| 9 |
</head> |
|---|
| 10 |
<body> |
|---|
| 11 |
<script type="text/javascript" language="javascript" src="../asdoc.js"></script><script type="text/javascript" language="javascript" src="../cookies.js"></script><script type="text/javascript" language="javascript"> |
|---|
| 12 |
<!-- |
|---|
| 13 |
asdocTitle = 'Command - API Documentation'; |
|---|
| 14 |
var baseRef = '../'; |
|---|
| 15 |
window.onload = configPage; |
|---|
| 16 |
--></script> |
|---|
| 17 |
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable"> |
|---|
| 18 |
<tr> |
|---|
| 19 |
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../all-classes.html')" href="../package-summary.html">All Packages</a> | <a onclick="loadClassListFrame('../all-classes.html')" href="../class-summary.html">All Classes</a> | <a onclick="loadClassListFrame('../index-list.html')" href="../all-index-A.html">Index</a> | <a href="../index.html?commands/Command.html&commands/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../images/logo.jpg"></td> |
|---|
| 20 |
</tr> |
|---|
| 21 |
<tr class="titleTableRow2"> |
|---|
| 22 |
<td align="left" id="subTitle" class="titleTableSubTitle">Class Command</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a> | <a href="#methodSummary">Methods</a></td> |
|---|
| 23 |
</tr> |
|---|
| 24 |
<tr class="titleTableRow3"> |
|---|
| 25 |
<td colspan="2"> </td> |
|---|
| 26 |
</tr> |
|---|
| 27 |
</table> |
|---|
| 28 |
<script type="text/javascript" language="javascript"> |
|---|
| 29 |
<!-- |
|---|
| 30 |
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Command"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);} |
|---|
| 31 |
--></script> |
|---|
| 32 |
<div class="MainContent"> |
|---|
| 33 |
<table cellspacing="0" cellpadding="0" class="classHeaderTable"> |
|---|
| 34 |
<tr> |
|---|
| 35 |
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">commands</a></td> |
|---|
| 36 |
</tr> |
|---|
| 37 |
<tr> |
|---|
| 38 |
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Command</td> |
|---|
| 39 |
</tr> |
|---|
| 40 |
<tr> |
|---|
| 41 |
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Command <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../images/inherit-arrow.gif"> <a href="CommandBase.html">CommandBase</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../images/inherit-arrow.gif"> flash.events.EventDispatcher</td> |
|---|
| 42 |
</tr> |
|---|
| 43 |
<tr> |
|---|
| 44 |
<td class="classHeaderTableLabel">Subclasses</td><td><a href="commands/AsyncCommand.html">AsyncCommand</a></td> |
|---|
| 45 |
</tr> |
|---|
| 46 |
</table> |
|---|
| 47 |
<p></p> |
|---|
| 48 |
「任意の関数を実行する」コマンド. |
|---|
| 49 |
|
|---|
| 50 |
<p>Commandクラスを用いることで、「関数の呼び出し」という行為を変数としてやりとりするが可能となります。</p> |
|---|
| 51 |
|
|---|
| 52 |
<p></p> |
|---|
| 53 |
<br> |
|---|
| 54 |
<span class="label">Example</span> |
|---|
| 55 |
<br>以下はCommandクラスの基本的な使い方です。この例では"Hello Command"という文字列を表示するCommandを作成し、実行しています。 |
|---|
| 56 |
<div class='listing'><pre> |
|---|
| 57 |
var command:Command = new Command(null, trace, ["Hello Command"]); |
|---|
| 58 |
command.execute(); |
|---|
| 59 |
|
|---|
| 60 |
//Outputs |
|---|
| 61 |
//Hello Command</pre></div> |
|---|
| 62 |
|
|---|
| 63 |
<p></p> |
|---|
| 64 |
<br> |
|---|
| 65 |
<hr> |
|---|
| 66 |
</div> |
|---|
| 67 |
<a name="propertySummary"></a><a name="protectedPropertySummary"></a> |
|---|
| 68 |
<div class="summarySection"> |
|---|
| 69 |
<div class="summaryTableTitle">Protected Properties</div> |
|---|
| 70 |
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0"> |
|---|
| 71 |
<tr> |
|---|
| 72 |
<th> </th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined by</th> |
|---|
| 73 |
</tr> |
|---|
| 74 |
<tr class=""> |
|---|
| 75 |
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_function">_function</a> : Function<div class="summaryTableDescription"></div> |
|---|
| 76 |
</td><td class="summaryTableOwnerCol">Command</td> |
|---|
| 77 |
</tr> |
|---|
| 78 |
<tr class=""> |
|---|
| 79 |
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_params">_params</a> : Array<div class="summaryTableDescription"></div> |
|---|
| 80 |
</td><td class="summaryTableOwnerCol">Command</td> |
|---|
| 81 |
</tr> |
|---|
| 82 |
<tr class=""> |
|---|
| 83 |
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#_thisObject">_thisObject</a> : Object<div class="summaryTableDescription"></div> |
|---|
| 84 |
</td><td class="summaryTableOwnerCol">Command</td> |
|---|
| 85 |
</tr> |
|---|
| 86 |
</table> |
|---|
| 87 |
</div> |
|---|
| 88 |
<a name="methodSummary"></a> |
|---|
| 89 |
<div class="summarySection"> |
|---|
| 90 |
<div class="summaryTableTitle">Public Methods</div> |
|---|
| 91 |
<div class="showHideLinks"> |
|---|
| 92 |
<div class="hideInheritedMethod" id="hideInheritedMethod"> |
|---|
| 93 |
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a> |
|---|
| 94 |
</div> |
|---|
| 95 |
<div class="showInheritedMethod" id="showInheritedMethod"> |
|---|
| 96 |
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a> |
|---|
| 97 |
</div> |
|---|
| 98 |
</div> |
|---|
| 99 |
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0"> |
|---|
| 100 |
<tr> |
|---|
| 101 |
<th> </th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined by</th> |
|---|
| 102 |
</tr> |
|---|
| 103 |
<tr class=""> |
|---|
| 104 |
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"> |
|---|
| 105 |
<div class="summarySignature"> |
|---|
| 106 |
<a class="signatureLink" href="#Command()">Command</a>(thisObject:Object, func:Function, params:Array = null)</div> |
|---|
| 107 |
<div class="summaryTableDescription"> |
|---|
| 108 |
関数execute()実行時に行いたい処理を登録します。 |
|---|
| 109 |
|
|---|
| 110 |
</div> |
|---|
| 111 |
</td><td class="summaryTableOwnerCol">Command</td> |
|---|
| 112 |
</tr> |
|---|
| 113 |
<tr class="hideInheritedMethod"> |
|---|
| 114 |
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"> |
|---|
| 115 |
<div class="summarySignature"> |
|---|
| 116 |
<a class="signatureLink" href="CommandBase.html#cancel()">cancel</a>():void</div> |
|---|
| 117 |
<div class="summaryTableDescription"> |
|---|
| 118 |
この関数は将来の拡張の為に予約されています。.</div> |
|---|
| 119 |
</td><td class="summaryTableOwnerCol"><a href="CommandBase.html">CommandBase</a></td> |
|---|
| 120 |
</tr> |
|---|
| 121 |
<tr class=""> |
|---|
| 122 |
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"> |
|---|
| 123 |
<div class="summarySignature"> |
|---|
| 124 |
<a class="signatureLink" href="#execute()">execute</a>():void</div> |
|---|
| 125 |
<div class="summaryTableDescription"> |
|---|
| 126 |
コンストラクタで登録した処理を実行します。 |
|---|
| 127 |
|
|---|
| 128 |
</div> |
|---|
| 129 |
</td><td class="summaryTableOwnerCol">Command</td> |
|---|
| 130 |
</tr> |
|---|
| 131 |
</table> |
|---|
| 132 |
</div> |
|---|
| 133 |
<a name="protectedMethodSummary"></a> |
|---|
| 134 |
<div class="summarySection"> |
|---|
| 135 |
<div class="summaryTableTitle">Protected Methods</div> |
|---|
| 136 |
<div class="showHideLinks"> |
|---|
| 137 |
<div class="hideInheritedProtectedMethod" id="hideInheritedProtectedMethod"> |
|---|
| 138 |
<a onclick="javascript:setInheritedVisible(false,'ProtectedMethod');" href="#protectedMethodSummary" class="showHideLink"><img src="../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Protected Methods</a> |
|---|
| 139 |
</div> |
|---|
| 140 |
<div class="showInheritedProtectedMethod" id="showInheritedProtectedMethod"> |
|---|
| 141 |
<a onclick="javascript:setInheritedVisible(true,'ProtectedMethod');" href="#protectedMethodSummary" class="showHideLink"><img src="../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Protected Methods</a> |
|---|
| 142 |
</div> |
|---|
| 143 |
</div> |
|---|
| 144 |
<table id="summaryTableProtectedMethod" class="summaryTable hideInheritedProtectedMethod" cellpadding="3" cellspacing="0"> |
|---|
| 145 |
<tr> |
|---|
| 146 |
<th> </th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined by</th> |
|---|
| 147 |
</tr> |
|---|
| 148 |
<tr class="hideInheritedProtectedMethod"> |
|---|
| 149 |
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"> |
|---|
| 150 |
<div class="summarySignature"> |
|---|
| 151 |
<a class="signatureLink" href="CommandBase.html#dispatchComplete()">dispatchComplete</a>():void</div> |
|---|
| 152 |
<div class="summaryTableDescription"> |
|---|
| 153 |
コマンドの終了を通知する為に、Event.COMPLETEを発行します.</div> |
|---|
| 154 |
</td><td class="summaryTableOwnerCol"><a href="CommandBase.html">CommandBase</a></td> |
|---|
| 155 |
</tr> |
|---|
| 156 |
</table> |
|---|
| 157 |
</div> |
|---|
| 158 |
<script type="text/javascript" language="javascript"> |
|---|
| 159 |
<!-- |
|---|
| 160 |
showHideInherited(); |
|---|
| 161 |
--></script> |
|---|
| 162 |
<div class="MainContent"> |
|---|
| 163 |
<a name="propertyDetail"></a> |
|---|
| 164 |
<div class="detailSectionHeader">Property detail</div> |
|---|
| 165 |
<a name="_function"></a> |
|---|
| 166 |
<table cellspacing="0" cellpadding="0" class="detailHeader"> |
|---|
| 167 |
<tr> |
|---|
| 168 |
<td class="detailHeaderName">_function</td><td class="detailHeaderType">property</td> |
|---|
| 169 |
</tr> |
|---|
| 170 |
</table> |
|---|
| 171 |
<div class="detailBody"> |
|---|
| 172 |
<code>protected var _function:Function</code> |
|---|
| 173 |
</div> |
|---|
| 174 |
<a name="_params"></a> |
|---|
| 175 |
<table cellspacing="0" cellpadding="0" class="detailHeader"> |
|---|
| 176 |
<tr> |
|---|
| 177 |
<td class="detailHeaderName">_params</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td> |
|---|
| 178 |
</tr> |
|---|
| 179 |
</table> |
|---|
| 180 |
<div class="detailBody"> |
|---|
| 181 |
<code>protected var _params:Array</code> |
|---|
| 182 |
</div> |
|---|
| 183 |
<a name="_thisObject"></a> |
|---|
| 184 |
<table cellspacing="0" cellpadding="0" class="detailHeader"> |
|---|
| 185 |
<tr> |
|---|
| 186 |
<td class="detailHeaderName">_thisObject</td><td class="detailHeaderType">property</td><td class="detailHeaderRule"> </td> |
|---|
| 187 |
</tr> |
|---|
| 188 |
</table> |
|---|
| 189 |
<div class="detailBody"> |
|---|
| 190 |
<code>protected var _thisObject:Object</code> |
|---|
| 191 |
</div> |
|---|
| 192 |
<a name="constructorDetail"></a> |
|---|
| 193 |
<div class="detailSectionHeader">Constructor detail</div> |
|---|
| 194 |
<a name="Command()"></a> |
|---|
| 195 |
<table cellspacing="0" cellpadding="0" class="detailHeader"> |
|---|
| 196 |
<tr> |
|---|
| 197 |
<td class="detailHeaderName">Command</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td> |
|---|
| 198 |
</tr> |
|---|
| 199 |
</table> |
|---|
| 200 |
<div class="detailBody"> |
|---|
| 201 |
<code>public function Command(thisObject:Object, func:Function, params:Array = null)</code><p> |
|---|
| 202 |
関数execute()実行時に行いたい処理を登録します。 |
|---|
| 203 |
|
|---|
| 204 |
</p><span class="label">Parameters</span> |
|---|
| 205 |
<table border="0" cellspacing="0" cellpadding="0"> |
|---|
| 206 |
<tr> |
|---|
| 207 |
<td width="20px"></td><td><code><span class="label">thisObject</span>:Object</code> — Thisとして使用されるスコープです。基本的にnullで問題ありません。クロージャおよびAS2との互換性の為に存在しています。 |
|---|
| 208 |
</td> |
|---|
| 209 |
</tr> |
|---|
| 210 |
<tr> |
|---|
| 211 |
<td class="paramSpacer"> </td> |
|---|
| 212 |
</tr> |
|---|
| 213 |
<tr> |
|---|
| 214 |
<td width="20px"></td><td><code><span class="label">func</span>:Function</code> — 登録したい関数の参照。 |
|---|
| 215 |
</td> |
|---|
| 216 |
</tr> |
|---|
| 217 |
<tr> |
|---|
| 218 |
<td class="paramSpacer"> </td> |
|---|
| 219 |
</tr> |
|---|
| 220 |
<tr> |
|---|
| 221 |
<td width="20px"></td><td><code><span class="label">params</span>:Array</code> (default = <code>null</code>)<code></code> — 関数実行時に渡されるパラメーター |
|---|
| 222 |
</td> |
|---|
| 223 |
</tr> |
|---|
| 224 |
</table> |
|---|
| 225 |
</div> |
|---|
| 226 |
<a name="methodDetail"></a> |
|---|
| 227 |
<div class="detailSectionHeader">Method detail</div> |
|---|
| 228 |
<a name="execute()"></a> |
|---|
| 229 |
<table cellspacing="0" cellpadding="0" class="detailHeader"> |
|---|
| 230 |
<tr> |
|---|
| 231 |
<td class="detailHeaderName">execute</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td> |
|---|
| 232 |
</tr> |
|---|
| 233 |
</table> |
|---|
| 234 |
<div class="detailBody"> |
|---|
| 235 |
<code>public override function execute():void</code><p> |
|---|
| 236 |
コンストラクタで登録した処理を実行します。 |
|---|
| 237 |
|
|---|
| 238 |
</p></div> |
|---|
| 239 |
<br> |
|---|
| 240 |
<br> |
|---|
| 241 |
<hr> |
|---|
| 242 |
<br> |
|---|
| 243 |
<p></p> |
|---|
| 244 |
<center class="copyright"> |
|---|
| 245 |
</center> |
|---|
| 246 |
</div> |
|---|
| 247 |
</body> |
|---|
| 248 |
</html> |
|---|
| 249 |
<!-- --> |
|---|