PageRenderTime 592ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/asdoc/en/aw/external/jsinterface/JSSimple.html

http://jsinterface.googlecode.com/
HTML | 264 lines | 225 code | 30 blank | 9 comment | 0 complexity | 866b2c466c6d37104b960102bafe1f3c MD5 | raw file
  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="JSSimple,aw.external.jsinterface.JSSimple,addSimpleType,getSimpleData,isSimpleType,removeSimpleType" name="keywords">
  8. <title>aw.external.jsinterface.JSSimple</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 = 'JSSimple - 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&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?aw/external/jsinterface/JSSimple.html&amp;aw/external/jsinterface/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;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&nbsp;JSSimple</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#methodSummary">Methods</a></td>
  23. </tr>
  24. <tr class="titleTableRow3">
  25. <td colspan="2">&nbsp;</td>
  26. </tr>
  27. </table>
  28. <script type="text/javascript" language="javascript">
  29. <!--
  30. if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class JSSimple"); titleBar_setSubNav(false,false,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">aw.external.jsinterface</a></td>
  36. </tr>
  37. <tr>
  38. <td class="classHeaderTableLabel">Class</td><td class="classSignature">public class JSSimple</td>
  39. </tr>
  40. <tr>
  41. <td class="classHeaderTableLabel">Implements</td><td><a href="IJSSimple.html">IJSSimple</a></td>
  42. </tr>
  43. </table>
  44. <p></p>
  45. It’s a ready wrapper object for objects, transferred to JavaScript directly.
  46. It allows transferring objects “as is”, without links or saving in the stack.
  47. If you need to transfer an object from Flash Player environment directly to
  48. JavaScript without any transformations then you should wrap it in this object.
  49. <p></p>
  50. <br>
  51. <span class="label">Example</span>
  52. <br><div class='listing'><pre>
  53. package {
  54. import aw.external.JSInterface;
  55. import aw.external.jsinterface.JSSimple;
  56. import flash.display.Sprite;
  57. public class Test extends Sprite{
  58. public var initData:Object = {color:0xff00ff, size:[100, 300], thickness:2};
  59. public function Test():void{
  60. super();
  61. JSInterface.initialize(this, true);
  62. JSInterface.window.definedJavaScriptDrawFunction(this.graphics, new JSSimple(this.initData));
  63. }
  64. }
  65. }
  66. </pre></div>
  67. <p></p>
  68. <p>
  69. <span class="classHeaderTableLabel">See also</span>
  70. </p>
  71. <div class="seeAlso">
  72. <a href="../jsinterface/IJSSimple.html" target="">aw.external.jsinterface.IJSSimple</a>
  73. </div>
  74. <br>
  75. <hr>
  76. </div>
  77. <a name="methodSummary"></a>
  78. <div class="summarySection">
  79. <div class="summaryTableTitle">Public Methods</div>
  80. <table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
  81. <tr>
  82. <th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
  83. </tr>
  84. <tr class="">
  85. <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
  86. <div class="summarySignature">
  87. <a class="signatureLink" href="#JSSimple()">JSSimple</a>(d:Object)</div>
  88. <div class="summaryTableDescription">
  89. </div>
  90. </td><td class="summaryTableOwnerCol">JSSimple</td>
  91. </tr>
  92. <tr class="">
  93. <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
  94. <div class="summarySignature">
  95. <a class="signatureLink" href="#addSimpleType()">addSimpleType</a>(obj:Object):void</div>
  96. <div class="summaryTableDescription">[static]
  97. </div>
  98. </td><td class="summaryTableOwnerCol">JSSimple</td>
  99. </tr>
  100. <tr class="">
  101. <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
  102. <div class="summarySignature">
  103. <a class="signatureLink" href="#getSimpleData()">getSimpleData</a>():*</div>
  104. <div class="summaryTableDescription">
  105. It’s a method that retrieves an object transferred to the constructor as a set of simple data.</div>
  106. </td><td class="summaryTableOwnerCol">JSSimple</td>
  107. </tr>
  108. <tr class="">
  109. <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
  110. <div class="summarySignature">
  111. <a class="signatureLink" href="#isSimpleType()">isSimpleType</a>(obj:Object):Boolean</div>
  112. <div class="summaryTableDescription">[static]
  113. </div>
  114. </td><td class="summaryTableOwnerCol">JSSimple</td>
  115. </tr>
  116. <tr class="">
  117. <td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
  118. <div class="summarySignature">
  119. <a class="signatureLink" href="#removeSimpleType()">removeSimpleType</a>(obj:Object):void</div>
  120. <div class="summaryTableDescription">[static]
  121. </div>
  122. </td><td class="summaryTableOwnerCol">JSSimple</td>
  123. </tr>
  124. </table>
  125. </div>
  126. <script type="text/javascript" language="javascript">
  127. <!--
  128. showHideInherited();
  129. --></script>
  130. <div class="MainContent">
  131. <a name="constructorDetail"></a>
  132. <div class="detailSectionHeader">Constructor detail</div>
  133. <a name="JSSimple()"></a>
  134. <table cellspacing="0" cellpadding="0" class="detailHeader">
  135. <tr>
  136. <td class="detailHeaderName">JSSimple</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
  137. </tr>
  138. </table>
  139. <div class="detailBody">
  140. <code>public function JSSimple(d:Object)</code><p>
  141. </p><span class="label">Parameters</span>
  142. <table border="0" cellspacing="0" cellpadding="0">
  143. <tr>
  144. <td width="20px"></td><td><code><span class="label">d</span>:Object</code></td>
  145. </tr>
  146. </table>
  147. </div>
  148. <a name="methodDetail"></a>
  149. <div class="detailSectionHeader">Method detail</div>
  150. <a name="addSimpleType()"></a>
  151. <table cellspacing="0" cellpadding="0" class="detailHeader">
  152. <tr>
  153. <td class="detailHeaderName">addSimpleType</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
  154. </tr>
  155. </table>
  156. <div class="detailBody">
  157. <code>public static function addSimpleType(obj:Object):void</code><p>
  158. </p><span class="label">Parameters</span>
  159. <table border="0" cellspacing="0" cellpadding="0">
  160. <tr>
  161. <td width="20px"></td><td><code><span class="label">obj</span>:Object</code></td>
  162. </tr>
  163. </table>
  164. </div>
  165. <a name="getSimpleData()"></a>
  166. <table cellspacing="0" cellpadding="0" class="detailHeader">
  167. <tr>
  168. <td class="detailHeaderName">getSimpleData</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
  169. </tr>
  170. </table>
  171. <div class="detailBody">
  172. <code>public function getSimpleData():*</code><p>
  173. It’s a method that retrieves an object transferred to the constructor as a set of simple data.
  174. It is used when forming a request to JavaScript environment and service information is generated
  175. for all complex objects. This information will be transferred. This object used as wrapper
  176. guarantees transfer of the original object to JavaScript environment directly, without writing
  177. it to stack and transferring additional information.
  178. </p><p></p>
  179. <span class="label">Returns</span>
  180. <table border="0" cellspacing="0" cellpadding="0">
  181. <tr>
  182. <td width="20"></td><td><code>*</code></td>
  183. </tr>
  184. </table>
  185. </div>
  186. <a name="isSimpleType()"></a>
  187. <table cellspacing="0" cellpadding="0" class="detailHeader">
  188. <tr>
  189. <td class="detailHeaderName">isSimpleType</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
  190. </tr>
  191. </table>
  192. <div class="detailBody">
  193. <code>public static function isSimpleType(obj:Object):Boolean</code><p>
  194. </p><span class="label">Parameters</span>
  195. <table border="0" cellspacing="0" cellpadding="0">
  196. <tr>
  197. <td width="20px"></td><td><code><span class="label">obj</span>:Object</code></td>
  198. </tr>
  199. </table>
  200. <p></p>
  201. <span class="label">Returns</span>
  202. <table border="0" cellspacing="0" cellpadding="0">
  203. <tr>
  204. <td width="20"></td><td><code>Boolean</code> &mdash; Boolean
  205. </td>
  206. </tr>
  207. </table>
  208. </div>
  209. <a name="removeSimpleType()"></a>
  210. <table cellspacing="0" cellpadding="0" class="detailHeader">
  211. <tr>
  212. <td class="detailHeaderName">removeSimpleType</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
  213. </tr>
  214. </table>
  215. <div class="detailBody">
  216. <code>public static function removeSimpleType(obj:Object):void</code><p>
  217. </p><span class="label">Parameters</span>
  218. <table border="0" cellspacing="0" cellpadding="0">
  219. <tr>
  220. <td width="20px"></td><td><code><span class="label">obj</span>:Object</code></td>
  221. </tr>
  222. </table>
  223. </div>
  224. <br>
  225. <br>
  226. <hr>
  227. <br>
  228. <p></p>
  229. <center class="copyright">
  230. </center>
  231. </div>
  232. </body>
  233. </html>
  234. <!-- -->