@afterswf/playerglobal 0.0.0-stage → 0.2.460

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1076) hide show
  1. package/.eslintrc +101 -0
  2. package/.gitattributes +1 -0
  3. package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
  4. package/.prettierrc +8 -0
  5. package/LICENSE +201 -0
  6. package/README.md +1 -3
  7. package/bundle/awayfl-playerglobal.umd.js +2 -0
  8. package/bundle/awayfl-playerglobal.umd.js.map +1 -0
  9. package/copyVersionToIndex.js +24 -0
  10. package/dist/index.d.ts +15 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +15 -0
  13. package/dist/lib/ILoader.d.ts +10 -0
  14. package/dist/lib/ILoader.d.ts.map +1 -0
  15. package/dist/lib/ILoader.js +1 -0
  16. package/dist/lib/PlayerGlobal.d.ts +28 -0
  17. package/dist/lib/PlayerGlobal.d.ts.map +1 -0
  18. package/dist/lib/PlayerGlobal.js +223 -0
  19. package/dist/lib/SecurityDomain.d.ts +195 -0
  20. package/dist/lib/SecurityDomain.d.ts.map +1 -0
  21. package/dist/lib/SecurityDomain.js +205 -0
  22. package/dist/lib/Settings.d.ts +5 -0
  23. package/dist/lib/Settings.d.ts.map +1 -0
  24. package/dist/lib/Settings.js +7 -0
  25. package/dist/lib/desktop/Clipboard.d.ts +251 -0
  26. package/dist/lib/desktop/Clipboard.d.ts.map +1 -0
  27. package/dist/lib/desktop/Clipboard.js +289 -0
  28. package/dist/lib/desktop/ClipboardFormats.d.ts +43 -0
  29. package/dist/lib/desktop/ClipboardFormats.d.ts.map +1 -0
  30. package/dist/lib/desktop/ClipboardFormats.js +45 -0
  31. package/dist/lib/display/Bitmap.d.ts +91 -0
  32. package/dist/lib/display/Bitmap.d.ts.map +1 -0
  33. package/dist/lib/display/Bitmap.js +168 -0
  34. package/dist/lib/display/BitmapData.d.ts +63 -0
  35. package/dist/lib/display/BitmapData.d.ts.map +1 -0
  36. package/dist/lib/display/BitmapData.js +315 -0
  37. package/dist/lib/display/BitmapDataChannel.d.ts +12 -0
  38. package/dist/lib/display/BitmapDataChannel.d.ts.map +1 -0
  39. package/dist/lib/display/BitmapDataChannel.js +21 -0
  40. package/dist/lib/display/DisplayObject.d.ts +986 -0
  41. package/dist/lib/display/DisplayObject.d.ts.map +1 -0
  42. package/dist/lib/display/DisplayObject.js +1553 -0
  43. package/dist/lib/display/DisplayObjectContainer.d.ts +327 -0
  44. package/dist/lib/display/DisplayObjectContainer.d.ts.map +1 -0
  45. package/dist/lib/display/DisplayObjectContainer.js +599 -0
  46. package/dist/lib/display/FrameLabel.d.ts +11 -0
  47. package/dist/lib/display/FrameLabel.d.ts.map +1 -0
  48. package/dist/lib/display/FrameLabel.js +34 -0
  49. package/dist/lib/display/Graphics.d.ts +94 -0
  50. package/dist/lib/display/Graphics.d.ts.map +1 -0
  51. package/dist/lib/display/Graphics.js +473 -0
  52. package/dist/lib/display/GraphicsBitmapFill.d.ts +13 -0
  53. package/dist/lib/display/GraphicsBitmapFill.d.ts.map +1 -0
  54. package/dist/lib/display/GraphicsBitmapFill.js +36 -0
  55. package/dist/lib/display/GraphicsEndFill.d.ts +7 -0
  56. package/dist/lib/display/GraphicsEndFill.d.ts.map +1 -0
  57. package/dist/lib/display/GraphicsEndFill.js +11 -0
  58. package/dist/lib/display/GraphicsGradientFill.d.ts +16 -0
  59. package/dist/lib/display/GraphicsGradientFill.d.ts.map +1 -0
  60. package/dist/lib/display/GraphicsGradientFill.js +28 -0
  61. package/dist/lib/display/GraphicsPath.d.ts +22 -0
  62. package/dist/lib/display/GraphicsPath.d.ts.map +1 -0
  63. package/dist/lib/display/GraphicsPath.js +63 -0
  64. package/dist/lib/display/GraphicsSolidFill.d.ts +9 -0
  65. package/dist/lib/display/GraphicsSolidFill.d.ts.map +1 -0
  66. package/dist/lib/display/GraphicsSolidFill.js +16 -0
  67. package/dist/lib/display/GraphicsStroke.d.ts +14 -0
  68. package/dist/lib/display/GraphicsStroke.d.ts.map +1 -0
  69. package/dist/lib/display/GraphicsStroke.js +26 -0
  70. package/dist/lib/display/GraphicsTrianglePath.d.ts +11 -0
  71. package/dist/lib/display/GraphicsTrianglePath.d.ts.map +1 -0
  72. package/dist/lib/display/GraphicsTrianglePath.js +20 -0
  73. package/dist/lib/display/IBitmapDataOwner.d.ts +6 -0
  74. package/dist/lib/display/IBitmapDataOwner.d.ts.map +1 -0
  75. package/dist/lib/display/IBitmapDataOwner.js +1 -0
  76. package/dist/lib/display/IBitmapDrawable.d.ts +10 -0
  77. package/dist/lib/display/IBitmapDrawable.d.ts.map +1 -0
  78. package/dist/lib/display/IBitmapDrawable.js +1 -0
  79. package/dist/lib/display/IGraphicsData.d.ts +13 -0
  80. package/dist/lib/display/IGraphicsData.d.ts.map +1 -0
  81. package/dist/lib/display/IGraphicsData.js +1 -0
  82. package/dist/lib/display/IVirtualSceneGraphItem.d.ts +9 -0
  83. package/dist/lib/display/IVirtualSceneGraphItem.d.ts.map +1 -0
  84. package/dist/lib/display/IVirtualSceneGraphItem.js +1 -0
  85. package/dist/lib/display/InteractiveObject.d.ts +502 -0
  86. package/dist/lib/display/InteractiveObject.d.ts.map +1 -0
  87. package/dist/lib/display/InteractiveObject.js +927 -0
  88. package/dist/lib/display/Loader.d.ts +492 -0
  89. package/dist/lib/display/Loader.d.ts.map +1 -0
  90. package/dist/lib/display/Loader.js +704 -0
  91. package/dist/lib/display/LoaderInfo.d.ts +480 -0
  92. package/dist/lib/display/LoaderInfo.d.ts.map +1 -0
  93. package/dist/lib/display/LoaderInfo.js +765 -0
  94. package/dist/lib/display/MovieClip.d.ts +201 -0
  95. package/dist/lib/display/MovieClip.d.ts.map +1 -0
  96. package/dist/lib/display/MovieClip.js +540 -0
  97. package/dist/lib/display/NativeMenu.d.ts +8 -0
  98. package/dist/lib/display/NativeMenu.d.ts.map +1 -0
  99. package/dist/lib/display/NativeMenu.js +13 -0
  100. package/dist/lib/display/NativeMenuItem.d.ts +11 -0
  101. package/dist/lib/display/NativeMenuItem.d.ts.map +1 -0
  102. package/dist/lib/display/NativeMenuItem.js +35 -0
  103. package/dist/lib/display/Scene.d.ts +23 -0
  104. package/dist/lib/display/Scene.d.ts.map +1 -0
  105. package/dist/lib/display/Scene.js +70 -0
  106. package/dist/lib/display/Shape.d.ts +38 -0
  107. package/dist/lib/display/Shape.d.ts.map +1 -0
  108. package/dist/lib/display/Shape.js +80 -0
  109. package/dist/lib/display/SimpleButton.d.ts +175 -0
  110. package/dist/lib/display/SimpleButton.d.ts.map +1 -0
  111. package/dist/lib/display/SimpleButton.js +522 -0
  112. package/dist/lib/display/Sprite.d.ts +204 -0
  113. package/dist/lib/display/Sprite.d.ts.map +1 -0
  114. package/dist/lib/display/Sprite.js +671 -0
  115. package/dist/lib/display/Stage.d.ts +723 -0
  116. package/dist/lib/display/Stage.d.ts.map +1 -0
  117. package/dist/lib/display/Stage.js +1298 -0
  118. package/dist/lib/errors/EOFError.d.ts +8 -0
  119. package/dist/lib/errors/EOFError.d.ts.map +1 -0
  120. package/dist/lib/errors/EOFError.js +18 -0
  121. package/dist/lib/errors/IOError.d.ts +8 -0
  122. package/dist/lib/errors/IOError.d.ts.map +1 -0
  123. package/dist/lib/errors/IOError.js +18 -0
  124. package/dist/lib/errors/IllegalOperationError.d.ts +8 -0
  125. package/dist/lib/errors/IllegalOperationError.d.ts.map +1 -0
  126. package/dist/lib/errors/IllegalOperationError.js +18 -0
  127. package/dist/lib/errors/InvalidSWFError.d.ts +8 -0
  128. package/dist/lib/errors/InvalidSWFError.d.ts.map +1 -0
  129. package/dist/lib/errors/InvalidSWFError.js +18 -0
  130. package/dist/lib/errors/MemoryError.d.ts +8 -0
  131. package/dist/lib/errors/MemoryError.d.ts.map +1 -0
  132. package/dist/lib/errors/MemoryError.js +18 -0
  133. package/dist/lib/errors/ScriptTimeoutError.d.ts +8 -0
  134. package/dist/lib/errors/ScriptTimeoutError.d.ts.map +1 -0
  135. package/dist/lib/errors/ScriptTimeoutError.js +18 -0
  136. package/dist/lib/errors/StackOverflowError.d.ts +8 -0
  137. package/dist/lib/errors/StackOverflowError.d.ts.map +1 -0
  138. package/dist/lib/errors/StackOverflowError.js +18 -0
  139. package/dist/lib/events/AccelerometerEvent.d.ts +13 -0
  140. package/dist/lib/events/AccelerometerEvent.d.ts.map +1 -0
  141. package/dist/lib/events/AccelerometerEvent.js +26 -0
  142. package/dist/lib/events/ActivityEvent.d.ts +10 -0
  143. package/dist/lib/events/ActivityEvent.d.ts.map +1 -0
  144. package/dist/lib/events/ActivityEvent.js +20 -0
  145. package/dist/lib/events/AsyncErrorEvent.d.ts +13 -0
  146. package/dist/lib/events/AsyncErrorEvent.d.ts.map +1 -0
  147. package/dist/lib/events/AsyncErrorEvent.js +31 -0
  148. package/dist/lib/events/ContextMenuEvent.d.ts +13 -0
  149. package/dist/lib/events/ContextMenuEvent.d.ts.map +1 -0
  150. package/dist/lib/events/ContextMenuEvent.js +24 -0
  151. package/dist/lib/events/DataEvent.d.ts +10 -0
  152. package/dist/lib/events/DataEvent.d.ts.map +1 -0
  153. package/dist/lib/events/DataEvent.js +19 -0
  154. package/dist/lib/events/ErrorEvent.d.ts +30 -0
  155. package/dist/lib/events/ErrorEvent.d.ts.map +1 -0
  156. package/dist/lib/events/ErrorEvent.js +53 -0
  157. package/dist/lib/events/Event.d.ts +87 -0
  158. package/dist/lib/events/Event.d.ts.map +1 -0
  159. package/dist/lib/events/Event.js +213 -0
  160. package/dist/lib/events/EventDispatcher.d.ts +57 -0
  161. package/dist/lib/events/EventDispatcher.d.ts.map +1 -0
  162. package/dist/lib/events/EventDispatcher.js +233 -0
  163. package/dist/lib/events/EventDispatcherBase.d.ts +61 -0
  164. package/dist/lib/events/EventDispatcherBase.d.ts.map +1 -0
  165. package/dist/lib/events/EventDispatcherBase.js +258 -0
  166. package/dist/lib/events/EventPhase.d.ts +26 -0
  167. package/dist/lib/events/EventPhase.d.ts.map +1 -0
  168. package/dist/lib/events/EventPhase.js +33 -0
  169. package/dist/lib/events/FocusEvent.d.ts +50 -0
  170. package/dist/lib/events/FocusEvent.d.ts.map +1 -0
  171. package/dist/lib/events/FocusEvent.js +102 -0
  172. package/dist/lib/events/FullScreenEvent.d.ts +12 -0
  173. package/dist/lib/events/FullScreenEvent.d.ts.map +1 -0
  174. package/dist/lib/events/FullScreenEvent.js +23 -0
  175. package/dist/lib/events/GameInputEvent.d.ts +27 -0
  176. package/dist/lib/events/GameInputEvent.d.ts.map +1 -0
  177. package/dist/lib/events/GameInputEvent.js +38 -0
  178. package/dist/lib/events/GeolocationEvent.d.ts +9 -0
  179. package/dist/lib/events/GeolocationEvent.d.ts.map +1 -0
  180. package/dist/lib/events/GeolocationEvent.js +25 -0
  181. package/dist/lib/events/GestureEvent.d.ts +33 -0
  182. package/dist/lib/events/GestureEvent.d.ts.map +1 -0
  183. package/dist/lib/events/GestureEvent.js +121 -0
  184. package/dist/lib/events/GesturePhase.d.ts +12 -0
  185. package/dist/lib/events/GesturePhase.d.ts.map +1 -0
  186. package/dist/lib/events/GesturePhase.js +18 -0
  187. package/dist/lib/events/HTTPStatusEvent.d.ts +40 -0
  188. package/dist/lib/events/HTTPStatusEvent.d.ts.map +1 -0
  189. package/dist/lib/events/HTTPStatusEvent.js +88 -0
  190. package/dist/lib/events/IEventMapper.d.ts +7 -0
  191. package/dist/lib/events/IEventMapper.d.ts.map +1 -0
  192. package/dist/lib/events/IEventMapper.js +1 -0
  193. package/dist/lib/events/IMEEvent.d.ts +11 -0
  194. package/dist/lib/events/IMEEvent.d.ts.map +1 -0
  195. package/dist/lib/events/IMEEvent.js +23 -0
  196. package/dist/lib/events/IOErrorEvent.d.ts +30 -0
  197. package/dist/lib/events/IOErrorEvent.d.ts.map +1 -0
  198. package/dist/lib/events/IOErrorEvent.js +46 -0
  199. package/dist/lib/events/KeyboardEvent.d.ts +46 -0
  200. package/dist/lib/events/KeyboardEvent.d.ts.map +1 -0
  201. package/dist/lib/events/KeyboardEvent.js +115 -0
  202. package/dist/lib/events/MouseEvent.d.ts +88 -0
  203. package/dist/lib/events/MouseEvent.d.ts.map +1 -0
  204. package/dist/lib/events/MouseEvent.js +267 -0
  205. package/dist/lib/events/NetDataEvent.d.ts +12 -0
  206. package/dist/lib/events/NetDataEvent.d.ts.map +1 -0
  207. package/dist/lib/events/NetDataEvent.js +22 -0
  208. package/dist/lib/events/NetStatusEvent.d.ts +29 -0
  209. package/dist/lib/events/NetStatusEvent.d.ts.map +1 -0
  210. package/dist/lib/events/NetStatusEvent.js +52 -0
  211. package/dist/lib/events/OutputProgressEvent.d.ts +11 -0
  212. package/dist/lib/events/OutputProgressEvent.d.ts.map +1 -0
  213. package/dist/lib/events/OutputProgressEvent.js +22 -0
  214. package/dist/lib/events/PressAndTapGestureEvent.d.ts +11 -0
  215. package/dist/lib/events/PressAndTapGestureEvent.d.ts.map +1 -0
  216. package/dist/lib/events/PressAndTapGestureEvent.js +28 -0
  217. package/dist/lib/events/ProgressEvent.d.ts +33 -0
  218. package/dist/lib/events/ProgressEvent.d.ts.map +1 -0
  219. package/dist/lib/events/ProgressEvent.js +65 -0
  220. package/dist/lib/events/SampleDataEvent.d.ts +108 -0
  221. package/dist/lib/events/SampleDataEvent.d.ts.map +1 -0
  222. package/dist/lib/events/SampleDataEvent.js +140 -0
  223. package/dist/lib/events/ShaderEvent.d.ts +11 -0
  224. package/dist/lib/events/ShaderEvent.d.ts.map +1 -0
  225. package/dist/lib/events/ShaderEvent.js +20 -0
  226. package/dist/lib/events/SoftKeyboardEvent.d.ts +12 -0
  227. package/dist/lib/events/SoftKeyboardEvent.d.ts.map +1 -0
  228. package/dist/lib/events/SoftKeyboardEvent.js +17 -0
  229. package/dist/lib/events/SoftKeyboardTrigger.d.ts +10 -0
  230. package/dist/lib/events/SoftKeyboardTrigger.d.ts.map +1 -0
  231. package/dist/lib/events/SoftKeyboardTrigger.js +16 -0
  232. package/dist/lib/events/StageVideoAvailabilityEvent.d.ts +10 -0
  233. package/dist/lib/events/StageVideoAvailabilityEvent.d.ts.map +1 -0
  234. package/dist/lib/events/StageVideoAvailabilityEvent.js +21 -0
  235. package/dist/lib/events/StageVideoEvent.d.ts +14 -0
  236. package/dist/lib/events/StageVideoEvent.d.ts.map +1 -0
  237. package/dist/lib/events/StageVideoEvent.js +26 -0
  238. package/dist/lib/events/StaticEvents.d.ts +4 -0
  239. package/dist/lib/events/StaticEvents.d.ts.map +1 -0
  240. package/dist/lib/events/StaticEvents.js +7 -0
  241. package/dist/lib/events/StatusEvent.d.ts +15 -0
  242. package/dist/lib/events/StatusEvent.d.ts.map +1 -0
  243. package/dist/lib/events/StatusEvent.js +46 -0
  244. package/dist/lib/events/SyncEvent.d.ts +10 -0
  245. package/dist/lib/events/SyncEvent.d.ts.map +1 -0
  246. package/dist/lib/events/SyncEvent.js +21 -0
  247. package/dist/lib/events/TextEvent.d.ts +31 -0
  248. package/dist/lib/events/TextEvent.d.ts.map +1 -0
  249. package/dist/lib/events/TextEvent.js +55 -0
  250. package/dist/lib/events/ThrottleEvent.d.ts +11 -0
  251. package/dist/lib/events/ThrottleEvent.d.ts.map +1 -0
  252. package/dist/lib/events/ThrottleEvent.js +23 -0
  253. package/dist/lib/events/ThrottleType.d.ts +11 -0
  254. package/dist/lib/events/ThrottleType.d.ts.map +1 -0
  255. package/dist/lib/events/ThrottleType.js +17 -0
  256. package/dist/lib/events/TimerEvent.d.ts +13 -0
  257. package/dist/lib/events/TimerEvent.d.ts.map +1 -0
  258. package/dist/lib/events/TimerEvent.js +26 -0
  259. package/dist/lib/events/TouchEvent.d.ts +430 -0
  260. package/dist/lib/events/TouchEvent.d.ts.map +1 -0
  261. package/dist/lib/events/TouchEvent.js +550 -0
  262. package/dist/lib/events/TransformGestureEvent.d.ts +12 -0
  263. package/dist/lib/events/TransformGestureEvent.d.ts.map +1 -0
  264. package/dist/lib/events/TransformGestureEvent.js +31 -0
  265. package/dist/lib/events/UncaughtErrorEvent.d.ts +9 -0
  266. package/dist/lib/events/UncaughtErrorEvent.d.ts.map +1 -0
  267. package/dist/lib/events/UncaughtErrorEvent.js +19 -0
  268. package/dist/lib/events/UncaughtErrorEvents.d.ts +23 -0
  269. package/dist/lib/events/UncaughtErrorEvents.d.ts.map +1 -0
  270. package/dist/lib/events/UncaughtErrorEvents.js +29 -0
  271. package/dist/lib/events/VideoEvent.d.ts +13 -0
  272. package/dist/lib/events/VideoEvent.d.ts.map +1 -0
  273. package/dist/lib/events/VideoEvent.js +24 -0
  274. package/dist/lib/external/ExternalInterface.d.ts +27 -0
  275. package/dist/lib/external/ExternalInterface.d.ts.map +1 -0
  276. package/dist/lib/external/ExternalInterface.js +298 -0
  277. package/dist/lib/factories/FlashSceneGraphFactory.d.ts +33 -0
  278. package/dist/lib/factories/FlashSceneGraphFactory.d.ts.map +1 -0
  279. package/dist/lib/factories/FlashSceneGraphFactory.js +175 -0
  280. package/dist/lib/filters/BevelFilter.d.ts +66 -0
  281. package/dist/lib/filters/BevelFilter.d.ts.map +1 -0
  282. package/dist/lib/filters/BevelFilter.js +207 -0
  283. package/dist/lib/filters/BitmapFilter.d.ts +27 -0
  284. package/dist/lib/filters/BitmapFilter.d.ts.map +1 -0
  285. package/dist/lib/filters/BitmapFilter.js +116 -0
  286. package/dist/lib/filters/BitmapFilterType.d.ts +26 -0
  287. package/dist/lib/filters/BitmapFilterType.d.ts.map +1 -0
  288. package/dist/lib/filters/BitmapFilterType.js +36 -0
  289. package/dist/lib/filters/BlurFilter.d.ts +23 -0
  290. package/dist/lib/filters/BlurFilter.d.ts.map +1 -0
  291. package/dist/lib/filters/BlurFilter.js +64 -0
  292. package/dist/lib/filters/ColorMatrixFilter.d.ts +39 -0
  293. package/dist/lib/filters/ColorMatrixFilter.d.ts.map +1 -0
  294. package/dist/lib/filters/ColorMatrixFilter.js +69 -0
  295. package/dist/lib/filters/ConvolutionFilter.d.ts +54 -0
  296. package/dist/lib/filters/ConvolutionFilter.d.ts.map +1 -0
  297. package/dist/lib/filters/ConvolutionFilter.js +180 -0
  298. package/dist/lib/filters/DisplacementMapFilter.d.ts +57 -0
  299. package/dist/lib/filters/DisplacementMapFilter.d.ts.map +1 -0
  300. package/dist/lib/filters/DisplacementMapFilter.js +159 -0
  301. package/dist/lib/filters/DropShadowFilter.d.ts +63 -0
  302. package/dist/lib/filters/DropShadowFilter.d.ts.map +1 -0
  303. package/dist/lib/filters/DropShadowFilter.js +185 -0
  304. package/dist/lib/filters/FilterBuilder.d.ts +6 -0
  305. package/dist/lib/filters/FilterBuilder.d.ts.map +1 -0
  306. package/dist/lib/filters/FilterBuilder.js +33 -0
  307. package/dist/lib/filters/GlowFilter.d.ts +53 -0
  308. package/dist/lib/filters/GlowFilter.d.ts.map +1 -0
  309. package/dist/lib/filters/GlowFilter.js +145 -0
  310. package/dist/lib/filters/GradientBevelFilter.d.ts +68 -0
  311. package/dist/lib/filters/GradientBevelFilter.d.ts.map +1 -0
  312. package/dist/lib/filters/GradientBevelFilter.js +228 -0
  313. package/dist/lib/filters/GradientGlowFilter.d.ts +59 -0
  314. package/dist/lib/filters/GradientGlowFilter.d.ts.map +1 -0
  315. package/dist/lib/filters/GradientGlowFilter.js +223 -0
  316. package/dist/lib/geom/ColorTransform.d.ts +91 -0
  317. package/dist/lib/geom/ColorTransform.d.ts.map +1 -0
  318. package/dist/lib/geom/ColorTransform.js +259 -0
  319. package/dist/lib/geom/Matrix.d.ts +288 -0
  320. package/dist/lib/geom/Matrix.d.ts.map +1 -0
  321. package/dist/lib/geom/Matrix.js +414 -0
  322. package/dist/lib/geom/Matrix3D.d.ts +45 -0
  323. package/dist/lib/geom/Matrix3D.d.ts.map +1 -0
  324. package/dist/lib/geom/Matrix3D.js +213 -0
  325. package/dist/lib/geom/PerspectiveProjection.d.ts +2 -0
  326. package/dist/lib/geom/PerspectiveProjection.d.ts.map +1 -0
  327. package/dist/lib/geom/PerspectiveProjection.js +1 -0
  328. package/dist/lib/geom/Point.d.ts +123 -0
  329. package/dist/lib/geom/Point.d.ts.map +1 -0
  330. package/dist/lib/geom/Point.js +196 -0
  331. package/dist/lib/geom/Rectangle.d.ts +310 -0
  332. package/dist/lib/geom/Rectangle.d.ts.map +1 -0
  333. package/dist/lib/geom/Rectangle.js +478 -0
  334. package/dist/lib/geom/Transform.d.ts +42 -0
  335. package/dist/lib/geom/Transform.d.ts.map +1 -0
  336. package/dist/lib/geom/Transform.js +112 -0
  337. package/dist/lib/geom/Vector3D.d.ts +324 -0
  338. package/dist/lib/geom/Vector3D.d.ts.map +1 -0
  339. package/dist/lib/geom/Vector3D.js +434 -0
  340. package/dist/lib/globalization/LocaleID.d.ts +38 -0
  341. package/dist/lib/globalization/LocaleID.d.ts.map +1 -0
  342. package/dist/lib/globalization/LocaleID.js +92 -0
  343. package/dist/lib/globalization/NumberFormatter.d.ts +391 -0
  344. package/dist/lib/globalization/NumberFormatter.d.ts.map +1 -0
  345. package/dist/lib/globalization/NumberFormatter.js +555 -0
  346. package/dist/lib/link.d.ts +2 -0
  347. package/dist/lib/link.d.ts.map +1 -0
  348. package/dist/lib/link.js +619 -0
  349. package/dist/lib/media/ID3Info.d.ts +60 -0
  350. package/dist/lib/media/ID3Info.d.ts.map +1 -0
  351. package/dist/lib/media/ID3Info.js +13 -0
  352. package/dist/lib/media/Sound.d.ts +353 -0
  353. package/dist/lib/media/Sound.d.ts.map +1 -0
  354. package/dist/lib/media/Sound.js +496 -0
  355. package/dist/lib/media/SoundChannel.d.ts +65 -0
  356. package/dist/lib/media/SoundChannel.d.ts.map +1 -0
  357. package/dist/lib/media/SoundChannel.js +152 -0
  358. package/dist/lib/media/SoundLoaderContext.d.ts +99 -0
  359. package/dist/lib/media/SoundLoaderContext.d.ts.map +1 -0
  360. package/dist/lib/media/SoundLoaderContext.js +21 -0
  361. package/dist/lib/media/SoundMixer.d.ts +49 -0
  362. package/dist/lib/media/SoundMixer.d.ts.map +1 -0
  363. package/dist/lib/media/SoundMixer.js +126 -0
  364. package/dist/lib/media/SoundTransform.d.ts +64 -0
  365. package/dist/lib/media/SoundTransform.d.ts.map +1 -0
  366. package/dist/lib/media/SoundTransform.js +146 -0
  367. package/dist/lib/net/FileFilter.d.ts +13 -0
  368. package/dist/lib/net/FileFilter.d.ts.map +1 -0
  369. package/dist/lib/net/FileFilter.js +40 -0
  370. package/dist/lib/net/FileReference.d.ts +49 -0
  371. package/dist/lib/net/FileReference.d.ts.map +1 -0
  372. package/dist/lib/net/FileReference.js +271 -0
  373. package/dist/lib/net/LocalConnection.d.ts +26 -0
  374. package/dist/lib/net/LocalConnection.d.ts.map +1 -0
  375. package/dist/lib/net/LocalConnection.js +251 -0
  376. package/dist/lib/net/NetConnection.d.ts +80 -0
  377. package/dist/lib/net/NetConnection.d.ts.map +1 -0
  378. package/dist/lib/net/NetConnection.js +447 -0
  379. package/dist/lib/net/Responder.d.ts +30 -0
  380. package/dist/lib/net/Responder.d.ts.map +1 -0
  381. package/dist/lib/net/Responder.js +49 -0
  382. package/dist/lib/net/SharedObject.d.ts +66 -0
  383. package/dist/lib/net/SharedObject.d.ts.map +1 -0
  384. package/dist/lib/net/SharedObject.js +323 -0
  385. package/dist/lib/net/Socket.d.ts +66 -0
  386. package/dist/lib/net/Socket.d.ts.map +1 -0
  387. package/dist/lib/net/Socket.js +248 -0
  388. package/dist/lib/net/URLLoader.d.ts +26 -0
  389. package/dist/lib/net/URLLoader.d.ts.map +1 -0
  390. package/dist/lib/net/URLLoader.js +116 -0
  391. package/dist/lib/net/URLLoaderDataFormat.d.ts +2 -0
  392. package/dist/lib/net/URLLoaderDataFormat.d.ts.map +1 -0
  393. package/dist/lib/net/URLLoaderDataFormat.js +1 -0
  394. package/dist/lib/net/URLRequest.d.ts +43 -0
  395. package/dist/lib/net/URLRequest.d.ts.map +1 -0
  396. package/dist/lib/net/URLRequest.js +141 -0
  397. package/dist/lib/net/URLVariables.d.ts +12 -0
  398. package/dist/lib/net/URLVariables.d.ts.map +1 -0
  399. package/dist/lib/net/URLVariables.js +67 -0
  400. package/dist/lib/system/ApplicationDomain.d.ts +104 -0
  401. package/dist/lib/system/ApplicationDomain.d.ts.map +1 -0
  402. package/dist/lib/system/ApplicationDomain.js +269 -0
  403. package/dist/lib/system/Capabilities.d.ts +58 -0
  404. package/dist/lib/system/Capabilities.d.ts.map +1 -0
  405. package/dist/lib/system/Capabilities.js +361 -0
  406. package/dist/lib/system/FSCommand.d.ts +5 -0
  407. package/dist/lib/system/FSCommand.d.ts.map +1 -0
  408. package/dist/lib/system/FSCommand.js +14 -0
  409. package/dist/lib/system/IME.d.ts +125 -0
  410. package/dist/lib/system/IME.d.ts.map +1 -0
  411. package/dist/lib/system/IME.js +163 -0
  412. package/dist/lib/system/LoaderContext.d.ts +421 -0
  413. package/dist/lib/system/LoaderContext.d.ts.map +1 -0
  414. package/dist/lib/system/LoaderContext.js +62 -0
  415. package/dist/lib/system/Security.d.ts +45 -0
  416. package/dist/lib/system/Security.d.ts.map +1 -0
  417. package/dist/lib/system/Security.js +107 -0
  418. package/dist/lib/system/SecurityDomain.d.ts +5 -0
  419. package/dist/lib/system/SecurityDomain.d.ts.map +1 -0
  420. package/dist/lib/system/SecurityDomain.js +18 -0
  421. package/dist/lib/system/System.d.ts +150 -0
  422. package/dist/lib/system/System.d.ts.map +1 -0
  423. package/dist/lib/system/System.js +238 -0
  424. package/dist/lib/system/TouchscreenType.d.ts +26 -0
  425. package/dist/lib/system/TouchscreenType.d.ts.map +1 -0
  426. package/dist/lib/system/TouchscreenType.js +35 -0
  427. package/dist/lib/text/CSMSettings.d.ts +11 -0
  428. package/dist/lib/text/CSMSettings.d.ts.map +1 -0
  429. package/dist/lib/text/CSMSettings.js +20 -0
  430. package/dist/lib/text/Font.d.ts +18 -0
  431. package/dist/lib/text/Font.d.ts.map +1 -0
  432. package/dist/lib/text/Font.js +70 -0
  433. package/dist/lib/text/FontType.d.ts +11 -0
  434. package/dist/lib/text/FontType.d.ts.map +1 -0
  435. package/dist/lib/text/FontType.js +17 -0
  436. package/dist/lib/text/StaticText.d.ts +13 -0
  437. package/dist/lib/text/StaticText.d.ts.map +1 -0
  438. package/dist/lib/text/StaticText.js +41 -0
  439. package/dist/lib/text/StyleSheet.d.ts +168 -0
  440. package/dist/lib/text/StyleSheet.d.ts.map +1 -0
  441. package/dist/lib/text/StyleSheet.js +198 -0
  442. package/dist/lib/text/TextColorType.d.ts +10 -0
  443. package/dist/lib/text/TextColorType.d.ts.map +1 -0
  444. package/dist/lib/text/TextColorType.js +15 -0
  445. package/dist/lib/text/TextDisplayMode.d.ts +11 -0
  446. package/dist/lib/text/TextDisplayMode.d.ts.map +1 -0
  447. package/dist/lib/text/TextDisplayMode.js +16 -0
  448. package/dist/lib/text/TextExtent.d.ts +11 -0
  449. package/dist/lib/text/TextExtent.d.ts.map +1 -0
  450. package/dist/lib/text/TextExtent.js +20 -0
  451. package/dist/lib/text/TextField.d.ts +911 -0
  452. package/dist/lib/text/TextField.d.ts.map +1 -0
  453. package/dist/lib/text/TextField.js +1398 -0
  454. package/dist/lib/text/TextFormat.d.ts +61 -0
  455. package/dist/lib/text/TextFormat.d.ts.map +1 -0
  456. package/dist/lib/text/TextFormat.js +266 -0
  457. package/dist/lib/text/TextFormatDisplay.d.ts +10 -0
  458. package/dist/lib/text/TextFormatDisplay.d.ts.map +1 -0
  459. package/dist/lib/text/TextFormatDisplay.js +19 -0
  460. package/dist/lib/text/TextLineMetrics.d.ts +57 -0
  461. package/dist/lib/text/TextLineMetrics.d.ts.map +1 -0
  462. package/dist/lib/text/TextLineMetrics.js +38 -0
  463. package/dist/lib/text/TextRenderer.d.ts +15 -0
  464. package/dist/lib/text/TextRenderer.d.ts.map +1 -0
  465. package/dist/lib/text/TextRenderer.js +71 -0
  466. package/dist/lib/text/TextRun.d.ts +19 -0
  467. package/dist/lib/text/TextRun.d.ts.map +1 -0
  468. package/dist/lib/text/TextRun.js +54 -0
  469. package/dist/lib/text/TextSnapshot.d.ts +15 -0
  470. package/dist/lib/text/TextSnapshot.d.ts.map +1 -0
  471. package/dist/lib/text/TextSnapshot.js +83 -0
  472. package/dist/lib/text/engine/BreakOpportunity.d.ts +11 -0
  473. package/dist/lib/text/engine/BreakOpportunity.d.ts.map +1 -0
  474. package/dist/lib/text/engine/BreakOpportunity.js +16 -0
  475. package/dist/lib/text/engine/CFFHinting.d.ts +9 -0
  476. package/dist/lib/text/engine/CFFHinting.d.ts.map +1 -0
  477. package/dist/lib/text/engine/CFFHinting.js +14 -0
  478. package/dist/lib/text/engine/ContentElement.d.ts +37 -0
  479. package/dist/lib/text/engine/ContentElement.d.ts.map +1 -0
  480. package/dist/lib/text/engine/ContentElement.js +123 -0
  481. package/dist/lib/text/engine/DigitCase.d.ts +10 -0
  482. package/dist/lib/text/engine/DigitCase.d.ts.map +1 -0
  483. package/dist/lib/text/engine/DigitCase.js +16 -0
  484. package/dist/lib/text/engine/DigitWidth.d.ts +10 -0
  485. package/dist/lib/text/engine/DigitWidth.d.ts.map +1 -0
  486. package/dist/lib/text/engine/DigitWidth.js +16 -0
  487. package/dist/lib/text/engine/EastAsianJustifier.d.ts +12 -0
  488. package/dist/lib/text/engine/EastAsianJustifier.d.ts.map +1 -0
  489. package/dist/lib/text/engine/EastAsianJustifier.js +50 -0
  490. package/dist/lib/text/engine/ElementFormat.d.ts +69 -0
  491. package/dist/lib/text/engine/ElementFormat.d.ts.map +1 -0
  492. package/dist/lib/text/engine/ElementFormat.js +291 -0
  493. package/dist/lib/text/engine/FontDescription.d.ts +31 -0
  494. package/dist/lib/text/engine/FontDescription.d.ts.map +1 -0
  495. package/dist/lib/text/engine/FontDescription.js +113 -0
  496. package/dist/lib/text/engine/FontLookup.d.ts +9 -0
  497. package/dist/lib/text/engine/FontLookup.d.ts.map +1 -0
  498. package/dist/lib/text/engine/FontLookup.js +15 -0
  499. package/dist/lib/text/engine/FontMetrics.d.ts +18 -0
  500. package/dist/lib/text/engine/FontMetrics.d.ts.map +1 -0
  501. package/dist/lib/text/engine/FontMetrics.js +24 -0
  502. package/dist/lib/text/engine/FontPosture.d.ts +9 -0
  503. package/dist/lib/text/engine/FontPosture.d.ts.map +1 -0
  504. package/dist/lib/text/engine/FontPosture.js +15 -0
  505. package/dist/lib/text/engine/FontWeight.d.ts +9 -0
  506. package/dist/lib/text/engine/FontWeight.d.ts.map +1 -0
  507. package/dist/lib/text/engine/FontWeight.js +15 -0
  508. package/dist/lib/text/engine/GraphicElement.d.ts +16 -0
  509. package/dist/lib/text/engine/GraphicElement.d.ts.map +1 -0
  510. package/dist/lib/text/engine/GraphicElement.js +72 -0
  511. package/dist/lib/text/engine/GroupElement.d.ts +23 -0
  512. package/dist/lib/text/engine/GroupElement.d.ts.map +1 -0
  513. package/dist/lib/text/engine/GroupElement.js +102 -0
  514. package/dist/lib/text/engine/JustificationStyle.d.ts +10 -0
  515. package/dist/lib/text/engine/JustificationStyle.d.ts.map +1 -0
  516. package/dist/lib/text/engine/JustificationStyle.js +16 -0
  517. package/dist/lib/text/engine/Kerning.d.ts +10 -0
  518. package/dist/lib/text/engine/Kerning.d.ts.map +1 -0
  519. package/dist/lib/text/engine/Kerning.js +16 -0
  520. package/dist/lib/text/engine/LigatureLevel.d.ts +12 -0
  521. package/dist/lib/text/engine/LigatureLevel.d.ts.map +1 -0
  522. package/dist/lib/text/engine/LigatureLevel.js +18 -0
  523. package/dist/lib/text/engine/LineJustification.d.ts +11 -0
  524. package/dist/lib/text/engine/LineJustification.d.ts.map +1 -0
  525. package/dist/lib/text/engine/LineJustification.js +17 -0
  526. package/dist/lib/text/engine/NativehacksForTLF.d.ts +22 -0
  527. package/dist/lib/text/engine/NativehacksForTLF.d.ts.map +1 -0
  528. package/dist/lib/text/engine/NativehacksForTLF.js +70 -0
  529. package/dist/lib/text/engine/RenderingMode.d.ts +9 -0
  530. package/dist/lib/text/engine/RenderingMode.d.ts.map +1 -0
  531. package/dist/lib/text/engine/RenderingMode.js +15 -0
  532. package/dist/lib/text/engine/SpaceJustifier.d.ts +20 -0
  533. package/dist/lib/text/engine/SpaceJustifier.d.ts.map +1 -0
  534. package/dist/lib/text/engine/SpaceJustifier.js +58 -0
  535. package/dist/lib/text/engine/TabAlignment.d.ts +11 -0
  536. package/dist/lib/text/engine/TabAlignment.d.ts.map +1 -0
  537. package/dist/lib/text/engine/TabAlignment.js +17 -0
  538. package/dist/lib/text/engine/TabStop.d.ts +13 -0
  539. package/dist/lib/text/engine/TabStop.d.ts.map +1 -0
  540. package/dist/lib/text/engine/TabStop.js +66 -0
  541. package/dist/lib/text/engine/TextBaseline.d.ts +14 -0
  542. package/dist/lib/text/engine/TextBaseline.d.ts.map +1 -0
  543. package/dist/lib/text/engine/TextBaseline.js +20 -0
  544. package/dist/lib/text/engine/TextBlock.d.ts +76 -0
  545. package/dist/lib/text/engine/TextBlock.d.ts.map +1 -0
  546. package/dist/lib/text/engine/TextBlock.js +500 -0
  547. package/dist/lib/text/engine/TextElement.d.ts +12 -0
  548. package/dist/lib/text/engine/TextElement.d.ts.map +1 -0
  549. package/dist/lib/text/engine/TextElement.js +45 -0
  550. package/dist/lib/text/engine/TextJustifier.d.ts +15 -0
  551. package/dist/lib/text/engine/TextJustifier.d.ts.map +1 -0
  552. package/dist/lib/text/engine/TextJustifier.js +46 -0
  553. package/dist/lib/text/engine/TextLine.d.ts +86 -0
  554. package/dist/lib/text/engine/TextLine.d.ts.map +1 -0
  555. package/dist/lib/text/engine/TextLine.js +381 -0
  556. package/dist/lib/text/engine/TextLineCreationResult.d.ts +11 -0
  557. package/dist/lib/text/engine/TextLineCreationResult.d.ts.map +1 -0
  558. package/dist/lib/text/engine/TextLineCreationResult.js +17 -0
  559. package/dist/lib/text/engine/TextLineMirrorRegion.d.ts +17 -0
  560. package/dist/lib/text/engine/TextLineMirrorRegion.d.ts.map +1 -0
  561. package/dist/lib/text/engine/TextLineMirrorRegion.js +75 -0
  562. package/dist/lib/text/engine/TextLineValidity.d.ts +11 -0
  563. package/dist/lib/text/engine/TextLineValidity.d.ts.map +1 -0
  564. package/dist/lib/text/engine/TextLineValidity.js +17 -0
  565. package/dist/lib/text/engine/TextRotation.d.ts +12 -0
  566. package/dist/lib/text/engine/TextRotation.d.ts.map +1 -0
  567. package/dist/lib/text/engine/TextRotation.js +18 -0
  568. package/dist/lib/text/engine/TypographicCase.d.ts +14 -0
  569. package/dist/lib/text/engine/TypographicCase.d.ts.map +1 -0
  570. package/dist/lib/text/engine/TypographicCase.js +20 -0
  571. package/dist/lib/text/ime/CompositionAttributeRange.d.ts +12 -0
  572. package/dist/lib/text/ime/CompositionAttributeRange.d.ts.map +1 -0
  573. package/dist/lib/text/ime/CompositionAttributeRange.js +20 -0
  574. package/dist/lib/ui/ContextMenu.d.ts +29 -0
  575. package/dist/lib/ui/ContextMenu.d.ts.map +1 -0
  576. package/dist/lib/ui/ContextMenu.js +128 -0
  577. package/dist/lib/ui/ContextMenuBuiltInItems.d.ts +31 -0
  578. package/dist/lib/ui/ContextMenuBuiltInItems.d.ts.map +1 -0
  579. package/dist/lib/ui/ContextMenuBuiltInItems.js +112 -0
  580. package/dist/lib/ui/ContextMenuClipboardItems.d.ts +24 -0
  581. package/dist/lib/ui/ContextMenuClipboardItems.d.ts.map +1 -0
  582. package/dist/lib/ui/ContextMenuClipboardItems.js +99 -0
  583. package/dist/lib/ui/ContextMenuItem.d.ts +19 -0
  584. package/dist/lib/ui/ContextMenuItem.d.ts.map +1 -0
  585. package/dist/lib/ui/ContextMenuItem.js +62 -0
  586. package/dist/lib/ui/GameInput.d.ts +12 -0
  587. package/dist/lib/ui/GameInput.d.ts.map +1 -0
  588. package/dist/lib/ui/GameInput.js +49 -0
  589. package/dist/lib/ui/GameInputControl.d.ts +17 -0
  590. package/dist/lib/ui/GameInputControl.d.ts.map +1 -0
  591. package/dist/lib/ui/GameInputControl.js +95 -0
  592. package/dist/lib/ui/GameInputControlType.d.ts +14 -0
  593. package/dist/lib/ui/GameInputControlType.d.ts.map +1 -0
  594. package/dist/lib/ui/GameInputControlType.js +23 -0
  595. package/dist/lib/ui/GameInputDevice.d.ts +21 -0
  596. package/dist/lib/ui/GameInputDevice.d.ts.map +1 -0
  597. package/dist/lib/ui/GameInputDevice.js +105 -0
  598. package/dist/lib/ui/GameInputFinger.d.ts +12 -0
  599. package/dist/lib/ui/GameInputFinger.d.ts.map +1 -0
  600. package/dist/lib/ui/GameInputFinger.js +21 -0
  601. package/dist/lib/ui/GameInputHand.d.ts +11 -0
  602. package/dist/lib/ui/GameInputHand.d.ts.map +1 -0
  603. package/dist/lib/ui/GameInputHand.js +20 -0
  604. package/dist/lib/ui/Keyboard.d.ts +36 -0
  605. package/dist/lib/ui/Keyboard.d.ts.map +1 -0
  606. package/dist/lib/ui/Keyboard.js +383 -0
  607. package/dist/lib/ui/Mouse.d.ts +14 -0
  608. package/dist/lib/ui/Mouse.d.ts.map +1 -0
  609. package/dist/lib/ui/Mouse.js +78 -0
  610. package/dist/lib/ui/MouseCursorData.d.ts +24 -0
  611. package/dist/lib/ui/MouseCursorData.d.ts.map +1 -0
  612. package/dist/lib/ui/MouseCursorData.js +55 -0
  613. package/dist/lib/ui/Multitouch.d.ts +78 -0
  614. package/dist/lib/ui/Multitouch.d.ts.map +1 -0
  615. package/dist/lib/ui/Multitouch.js +135 -0
  616. package/dist/lib/ui/MultitouchInputMode.d.ts +26 -0
  617. package/dist/lib/ui/MultitouchInputMode.d.ts.map +1 -0
  618. package/dist/lib/ui/MultitouchInputMode.js +29 -0
  619. package/dist/lib/utils/ByteArray.d.ts +2 -0
  620. package/dist/lib/utils/ByteArray.d.ts.map +1 -0
  621. package/dist/lib/utils/ByteArray.js +1 -0
  622. package/dist/lib/utils/CompressionAlgorithm.d.ts +7 -0
  623. package/dist/lib/utils/CompressionAlgorithm.d.ts.map +1 -0
  624. package/dist/lib/utils/CompressionAlgorithm.js +13 -0
  625. package/dist/lib/utils/IDataInput.d.ts +175 -0
  626. package/dist/lib/utils/IDataInput.d.ts.map +1 -0
  627. package/dist/lib/utils/IDataInput.js +1 -0
  628. package/dist/lib/utils/IDataOutput.d.ts +131 -0
  629. package/dist/lib/utils/IDataOutput.d.ts.map +1 -0
  630. package/dist/lib/utils/IDataOutput.js +1 -0
  631. package/dist/lib/utils/IExternalizable.d.ts +35 -0
  632. package/dist/lib/utils/IExternalizable.d.ts.map +1 -0
  633. package/dist/lib/utils/IExternalizable.js +1 -0
  634. package/dist/lib/utils/Timer.d.ts +28 -0
  635. package/dist/lib/utils/Timer.d.ts.map +1 -0
  636. package/dist/lib/utils/Timer.js +115 -0
  637. package/index.ts +21 -0
  638. package/lib/ILoader.ts +14 -0
  639. package/lib/PlayerGlobal.ts +278 -0
  640. package/lib/RegisterCode.ts +10 -0
  641. package/lib/SecurityDomain.ts +194 -0
  642. package/lib/Settings.ts +15 -0
  643. package/lib/_shumway_flash/accessibility/Accessibility.ts +40 -0
  644. package/lib/_shumway_flash/accessibility/AccessibilityImplementation.ts +40 -0
  645. package/lib/_shumway_flash/accessibility/AccessibilityProperties.ts +29 -0
  646. package/lib/_shumway_flash/accessibility/ISearchableText.ts +4 -0
  647. package/lib/_shumway_flash/accessibility/ISimpleTextSelection.ts +4 -0
  648. package/lib/_shumway_flash/automation/ActionGenerator.ts +14 -0
  649. package/lib/_shumway_flash/automation/AutomationAction.ts +14 -0
  650. package/lib/_shumway_flash/automation/Configuration.ts +23 -0
  651. package/lib/_shumway_flash/automation/KeyboardAutomationAction.ts +16 -0
  652. package/lib/_shumway_flash/automation/MouseAutomationAction.ts +20 -0
  653. package/lib/_shumway_flash/automation/StageCapture.ts +50 -0
  654. package/lib/_shumway_flash/automation/StageCaptureEvent.ts +21 -0
  655. package/lib/_shumway_flash/desktop/ClipboardTransferMode.ts +24 -0
  656. package/lib/_shumway_flash/display/AVM1Movie.ts +157 -0
  657. package/lib/_shumway_flash/display/ActionScriptVersion.ts +21 -0
  658. package/lib/_shumway_flash/display/BitmapEncodingColorSpace.ts +24 -0
  659. package/lib/_shumway_flash/display/ColorCorrection.ts +50 -0
  660. package/lib/_shumway_flash/display/ColorCorrectionSupport.ts +50 -0
  661. package/lib/_shumway_flash/display/FocusDirection.ts +23 -0
  662. package/lib/_shumway_flash/display/GraphicsBitmapFill.ts +35 -0
  663. package/lib/_shumway_flash/display/GraphicsEndFill.ts +23 -0
  664. package/lib/_shumway_flash/display/GraphicsGradientFill.ts +31 -0
  665. package/lib/_shumway_flash/display/GraphicsShaderFill.ts +30 -0
  666. package/lib/_shumway_flash/display/GraphicsSolidFill.ts +28 -0
  667. package/lib/_shumway_flash/display/GraphicsStroke.ts +48 -0
  668. package/lib/_shumway_flash/display/GraphicsTrianglePath.ts +38 -0
  669. package/lib/_shumway_flash/display/JPEGEncoderOptions.ts +25 -0
  670. package/lib/_shumway_flash/display/JPEGXREncoderOptions.ts +24 -0
  671. package/lib/_shumway_flash/display/MorphShape.ts +70 -0
  672. package/lib/_shumway_flash/display/PNGEncoderOptions.ts +25 -0
  673. package/lib/_shumway_flash/display/SWFVersion.ts +34 -0
  674. package/lib/_shumway_flash/display/Shader.ts +46 -0
  675. package/lib/_shumway_flash/display/ShaderData.ts +20 -0
  676. package/lib/_shumway_flash/display/ShaderInput.ts +63 -0
  677. package/lib/_shumway_flash/display/ShaderJob.ts +81 -0
  678. package/lib/_shumway_flash/display/ShaderParameter.ts +43 -0
  679. package/lib/_shumway_flash/display/ShaderParameterType.ts +37 -0
  680. package/lib/_shumway_flash/display/ShaderPrecision.ts +24 -0
  681. package/lib/_shumway_flash/display/Stage3D.ts +64 -0
  682. package/lib/_shumway_flash/display/StageAlign.ts +69 -0
  683. package/lib/_shumway_flash/display/StageDisplayState.ts +50 -0
  684. package/lib/_shumway_flash/display/StageQuality.ts +75 -0
  685. package/lib/_shumway_flash/display/StageScaleMode.ts +66 -0
  686. package/lib/_shumway_flash/display/interfaces.ts +6 -0
  687. package/lib/_shumway_flash/display3D/Context3DBlendFactor.ts +50 -0
  688. package/lib/_shumway_flash/display3D/Context3DCompareMode.ts +48 -0
  689. package/lib/_shumway_flash/display3D/Context3DProfile.ts +42 -0
  690. package/lib/_shumway_flash/display3D/Context3DRenderMode.ts +42 -0
  691. package/lib/_shumway_flash/display3D/Context3DStencilAction.ts +48 -0
  692. package/lib/_shumway_flash/display3D/Context3DTextureFormat.ts +43 -0
  693. package/lib/_shumway_flash/display3D/Context3DTriangleFace.ts +44 -0
  694. package/lib/_shumway_flash/display3D/Context3DVertexBufferFormat.ts +45 -0
  695. package/lib/_shumway_flash/display3D/IndexBuffer3D.ts +53 -0
  696. package/lib/_shumway_flash/display3D/Program3D.ts +48 -0
  697. package/lib/_shumway_flash/display3D/VertexBuffer3D.ts +35 -0
  698. package/lib/_shumway_flash/display3D/textures/CubeTexture.ts +50 -0
  699. package/lib/_shumway_flash/display3D/textures/TextureBase.ts +39 -0
  700. package/lib/_shumway_flash/filters/BitmapFilterQuality.ts +25 -0
  701. package/lib/_shumway_flash/filters/DisplacementMapFilterMode.ts +25 -0
  702. package/lib/_shumway_flash/filters/ShaderFilter.ts +43 -0
  703. package/lib/_shumway_flash/globalization/Collator.ts +148 -0
  704. package/lib/_shumway_flash/globalization/CollatorMode.ts +37 -0
  705. package/lib/_shumway_flash/globalization/CurrencyFormatter.ts +232 -0
  706. package/lib/_shumway_flash/globalization/CurrencyParseResult.ts +57 -0
  707. package/lib/_shumway_flash/globalization/DateTimeFormatter.ts +110 -0
  708. package/lib/_shumway_flash/globalization/DateTimeNameContext.ts +42 -0
  709. package/lib/_shumway_flash/globalization/DateTimeNameStyle.ts +43 -0
  710. package/lib/_shumway_flash/globalization/DateTimeStyle.ts +45 -0
  711. package/lib/_shumway_flash/globalization/LastOperationStatus.ts +57 -0
  712. package/lib/_shumway_flash/globalization/LocaleID.ts +86 -0
  713. package/lib/_shumway_flash/globalization/NationalDigitsType.ts +72 -0
  714. package/lib/_shumway_flash/globalization/NumberParseResult.ts +63 -0
  715. package/lib/_shumway_flash/media/AudioDecoder.ts +44 -0
  716. package/lib/_shumway_flash/media/Camera.ts +167 -0
  717. package/lib/_shumway_flash/media/H264Level.ts +54 -0
  718. package/lib/_shumway_flash/media/H264Profile.ts +40 -0
  719. package/lib/_shumway_flash/media/H264VideoStreamSettings.ts +48 -0
  720. package/lib/_shumway_flash/media/Microphone.ts +217 -0
  721. package/lib/_shumway_flash/media/MicrophoneEnhancedMode.ts +43 -0
  722. package/lib/_shumway_flash/media/MicrophoneEnhancedOptions.ts +49 -0
  723. package/lib/_shumway_flash/media/SoundCodec.ts +42 -0
  724. package/lib/_shumway_flash/media/StageVideo.ts +119 -0
  725. package/lib/_shumway_flash/media/StageVideoAvailability.ts +40 -0
  726. package/lib/_shumway_flash/media/Video.ts +151 -0
  727. package/lib/_shumway_flash/media/VideoCodec.ts +41 -0
  728. package/lib/_shumway_flash/media/VideoStatus.ts +41 -0
  729. package/lib/_shumway_flash/media/VideoStreamSettings.ts +56 -0
  730. package/lib/_shumway_flash/net/DynamicPropertyOutput.ts +45 -0
  731. package/lib/_shumway_flash/net/FileFilter.ts +66 -0
  732. package/lib/_shumway_flash/net/FileReferenceList.ts +39 -0
  733. package/lib/_shumway_flash/net/GroupSpecifier.ts +67 -0
  734. package/lib/_shumway_flash/net/IDynamicPropertyOutput.ts +25 -0
  735. package/lib/_shumway_flash/net/IDynamicPropertyWriter.ts +28 -0
  736. package/lib/_shumway_flash/net/LocalConnection.ts +249 -0
  737. package/lib/_shumway_flash/net/NetConnection.ts +268 -0
  738. package/lib/_shumway_flash/net/NetGroup.ts +88 -0
  739. package/lib/_shumway_flash/net/NetGroupInfo.ts +54 -0
  740. package/lib/_shumway_flash/net/NetGroupReceiveMode.ts +37 -0
  741. package/lib/_shumway_flash/net/NetGroupReplicationStrategy.ts +40 -0
  742. package/lib/_shumway_flash/net/NetGroupSendMode.ts +37 -0
  743. package/lib/_shumway_flash/net/NetGroupSendResult.ts +38 -0
  744. package/lib/_shumway_flash/net/NetMonitor.ts +38 -0
  745. package/lib/_shumway_flash/net/NetStream.ts +1078 -0
  746. package/lib/_shumway_flash/net/NetStreamAppendBytesAction.ts +38 -0
  747. package/lib/_shumway_flash/net/NetStreamInfo.ts +119 -0
  748. package/lib/_shumway_flash/net/NetStreamMulticastInfo.ts +103 -0
  749. package/lib/_shumway_flash/net/NetStreamPlayOptions.ts +45 -0
  750. package/lib/_shumway_flash/net/NetStreamPlayTransitions.ts +45 -0
  751. package/lib/_shumway_flash/net/Responder.ts +40 -0
  752. package/lib/_shumway_flash/net/SecureSocket.ts +60 -0
  753. package/lib/_shumway_flash/net/SharedObjectFlushStatus.ts +37 -0
  754. package/lib/_shumway_flash/net/Socket.ts +230 -0
  755. package/lib/_shumway_flash/net/URLRequestHeader.ts +22 -0
  756. package/lib/_shumway_flash/net/URLStream.ts +206 -0
  757. package/lib/_shumway_flash/net/XMLSocket.ts +32 -0
  758. package/lib/_shumway_flash/printing/PrintJob.ts +42 -0
  759. package/lib/_shumway_flash/printing/PrintJobOptions.ts +25 -0
  760. package/lib/_shumway_flash/printing/PrintJobOrientation.ts +24 -0
  761. package/lib/_shumway_flash/profiler/Telemetry.ts +48 -0
  762. package/lib/_shumway_flash/sampler/ClassFactory.ts +22 -0
  763. package/lib/_shumway_flash/sampler/DeleteObjectSample.ts +20 -0
  764. package/lib/_shumway_flash/sampler/StackFrame.ts +22 -0
  765. package/lib/_shumway_flash/security/CertificateStatus.ts +28 -0
  766. package/lib/_shumway_flash/security/X500DistinguishedName.ts +56 -0
  767. package/lib/_shumway_flash/security/X509Certificate.ts +87 -0
  768. package/lib/_shumway_flash/sensors/Accelerometer.ts +35 -0
  769. package/lib/_shumway_flash/sensors/Geolocation.ts +33 -0
  770. package/lib/_shumway_flash/system/ApplicationInstaller.ts +57 -0
  771. package/lib/_shumway_flash/system/AuthorizedFeatures.ts +58 -0
  772. package/lib/_shumway_flash/system/AuthorizedFeaturesLoader.ts +49 -0
  773. package/lib/_shumway_flash/system/DomainMemoryWithStage3D.ts +33 -0
  774. package/lib/_shumway_flash/system/IMEConversionMode.ts +43 -0
  775. package/lib/_shumway_flash/system/ImageDecodingPolicy.ts +36 -0
  776. package/lib/_shumway_flash/system/JPEGLoaderContext.ts +42 -0
  777. package/lib/_shumway_flash/system/MessageChannel.ts +65 -0
  778. package/lib/_shumway_flash/system/MessageChannelState.ts +38 -0
  779. package/lib/_shumway_flash/system/SecurityPanel.ts +42 -0
  780. package/lib/_shumway_flash/system/SystemUpdater.ts +36 -0
  781. package/lib/_shumway_flash/system/SystemUpdaterType.ts +37 -0
  782. package/lib/_shumway_flash/ui/KeyLocation.ts +39 -0
  783. package/lib/_shumway_flash/ui/KeyboardType.ts +37 -0
  784. package/lib/_shumway_flash/ui/MouseCursor.ts +75 -0
  785. package/lib/_shumway_flash/ui/MouseCursorData.ts +72 -0
  786. package/lib/_shumway_flash/utils/CompressionAlgorithm.ts +20 -0
  787. package/lib/_shumway_flash/utils/IDataInput2.ts +9 -0
  788. package/lib/_shumway_flash/utils/IDataOutput2.ts +9 -0
  789. package/lib/_shumway_flash/utils/IExternalizable.ts +13 -0
  790. package/lib/_shumway_flash/utils/SetIntervalTimer.ts +20 -0
  791. package/lib/_shumway_flash/utils/Timer.ts +111 -0
  792. package/lib/desktop/Clipboard.ts +292 -0
  793. package/lib/desktop/ClipboardFormats.ts +51 -0
  794. package/lib/display/Bitmap.ts +189 -0
  795. package/lib/display/BitmapData.ts +496 -0
  796. package/lib/display/BitmapDataChannel.ts +24 -0
  797. package/lib/display/BlendMode.ts +1 -0
  798. package/lib/display/CapsStyle.ts +1 -0
  799. package/lib/display/DisplayObject.ts +1601 -0
  800. package/lib/display/DisplayObjectContainer.ts +640 -0
  801. package/lib/display/FrameLabel.ts +30 -0
  802. package/lib/display/GradientType.ts +1 -0
  803. package/lib/display/Graphics.ts +609 -0
  804. package/lib/display/GraphicsBitmapFill.ts +39 -0
  805. package/lib/display/GraphicsEndFill.ts +11 -0
  806. package/lib/display/GraphicsGradientFill.ts +31 -0
  807. package/lib/display/GraphicsPath.ts +75 -0
  808. package/lib/display/GraphicsPathCommand.ts +1 -0
  809. package/lib/display/GraphicsPathWinding.ts +1 -0
  810. package/lib/display/GraphicsSolidFill.ts +16 -0
  811. package/lib/display/GraphicsStroke.ts +33 -0
  812. package/lib/display/GraphicsTrianglePath.ts +24 -0
  813. package/lib/display/IBitmapDataOwner.ts +7 -0
  814. package/lib/display/IBitmapDrawable.ts +11 -0
  815. package/lib/display/IGraphicsData.ts +15 -0
  816. package/lib/display/IVirtualSceneGraphItem.ts +9 -0
  817. package/lib/display/InteractiveObject.ts +986 -0
  818. package/lib/display/InterpolationMethod.ts +1 -0
  819. package/lib/display/JointStyle.ts +1 -0
  820. package/lib/display/LineScaleMode.ts +1 -0
  821. package/lib/display/Loader.ts +777 -0
  822. package/lib/display/LoaderInfo.ts +743 -0
  823. package/lib/display/MovieClip.ts +570 -0
  824. package/lib/display/NativeMenu.ts +11 -0
  825. package/lib/display/NativeMenuItem.ts +34 -0
  826. package/lib/display/PixelSnapping.ts +1 -0
  827. package/lib/display/Scene.ts +69 -0
  828. package/lib/display/Shape.ts +89 -0
  829. package/lib/display/SimpleButton.ts +555 -0
  830. package/lib/display/SpreadMethod.ts +1 -0
  831. package/lib/display/Sprite.ts +774 -0
  832. package/lib/display/Stage.ts +1143 -0
  833. package/lib/display/TriangleCulling.ts +1 -0
  834. package/lib/display3D/Context3D.ts +1 -0
  835. package/lib/display3D/Context3DClearMask.ts +1 -0
  836. package/lib/display3D/Context3DProgramType.ts +1 -0
  837. package/lib/display3D/Texture.ts +29 -0
  838. package/lib/errors/EOFError.ts +17 -0
  839. package/lib/errors/IOError.ts +16 -0
  840. package/lib/errors/IllegalOperationError.ts +17 -0
  841. package/lib/errors/InvalidSWFError.ts +16 -0
  842. package/lib/errors/MemoryError.ts +16 -0
  843. package/lib/errors/ScriptTimeoutError.ts +16 -0
  844. package/lib/errors/StackOverflowError.ts +16 -0
  845. package/lib/events/AccelerometerEvent.ts +26 -0
  846. package/lib/events/ActivityEvent.ts +19 -0
  847. package/lib/events/AsyncErrorEvent.ts +31 -0
  848. package/lib/events/ContextMenuEvent.ts +26 -0
  849. package/lib/events/DataEvent.ts +17 -0
  850. package/lib/events/ErrorEvent.ts +54 -0
  851. package/lib/events/Event.ts +229 -0
  852. package/lib/events/EventDispatcher.ts +283 -0
  853. package/lib/events/EventDispatcherBase.ts +289 -0
  854. package/lib/events/EventPhase.ts +34 -0
  855. package/lib/events/FocusEvent.ts +97 -0
  856. package/lib/events/FullScreenEvent.ts +22 -0
  857. package/lib/events/GameInputEvent.ts +38 -0
  858. package/lib/events/GeolocationEvent.ts +18 -0
  859. package/lib/events/GestureEvent.ts +113 -0
  860. package/lib/events/GesturePhase.ts +18 -0
  861. package/lib/events/HTTPStatusEvent.ts +81 -0
  862. package/lib/events/IEventDispatcher.ts +1 -0
  863. package/lib/events/IEventMapper.ts +7 -0
  864. package/lib/events/IMEEvent.ts +21 -0
  865. package/lib/events/IOErrorEvent.ts +49 -0
  866. package/lib/events/KeyboardEvent.ts +114 -0
  867. package/lib/events/MouseEvent.ts +279 -0
  868. package/lib/events/NetDataEvent.ts +22 -0
  869. package/lib/events/NetFilterEvent.ts +20 -0
  870. package/lib/events/NetMonitorEvent.ts +20 -0
  871. package/lib/events/NetStatusEvent.ts +53 -0
  872. package/lib/events/OutputProgressEvent.ts +20 -0
  873. package/lib/events/PressAndTapGestureEvent.ts +24 -0
  874. package/lib/events/ProgressEvent.ts +66 -0
  875. package/lib/events/SampleDataEvent.ts +140 -0
  876. package/lib/events/SecurityErrorEvent.ts +16 -0
  877. package/lib/events/ShaderEvent.ts +19 -0
  878. package/lib/events/SoftKeyboardEvent.ts +19 -0
  879. package/lib/events/SoftKeyboardTrigger.ts +16 -0
  880. package/lib/events/StageVideoAvailabilityEvent.ts +20 -0
  881. package/lib/events/StageVideoEvent.ts +26 -0
  882. package/lib/events/StaticEvents.ts +5 -0
  883. package/lib/events/StatusEvent.ts +45 -0
  884. package/lib/events/SyncEvent.ts +19 -0
  885. package/lib/events/TextEvent.ts +60 -0
  886. package/lib/events/ThrottleEvent.ts +23 -0
  887. package/lib/events/ThrottleType.ts +18 -0
  888. package/lib/events/TimerEvent.ts +31 -0
  889. package/lib/events/TouchEvent.ts +548 -0
  890. package/lib/events/TransformGestureEvent.ts +21 -0
  891. package/lib/events/UncaughtErrorEvent.ts +17 -0
  892. package/lib/events/UncaughtErrorEvents.ts +29 -0
  893. package/lib/events/VideoEvent.ts +24 -0
  894. package/lib/external/ExternalInterface.ts +304 -0
  895. package/lib/factories/FlashSceneGraphFactory.ts +205 -0
  896. package/lib/filters/BevelFilter.ts +247 -0
  897. package/lib/filters/BitmapFilter.ts +123 -0
  898. package/lib/filters/BitmapFilterType.ts +43 -0
  899. package/lib/filters/BlurFilter.ts +69 -0
  900. package/lib/filters/ColorMatrixFilter.ts +96 -0
  901. package/lib/filters/ConvolutionFilter.ts +187 -0
  902. package/lib/filters/DisplacementMapFilter.ts +191 -0
  903. package/lib/filters/DropShadowFilter.ts +203 -0
  904. package/lib/filters/FilterBuilder.ts +34 -0
  905. package/lib/filters/GlowFilter.ts +162 -0
  906. package/lib/filters/GradientBevelFilter.ts +276 -0
  907. package/lib/filters/GradientGlowFilter.ts +239 -0
  908. package/lib/geom/ColorTransform.ts +294 -0
  909. package/lib/geom/Matrix.ts +428 -0
  910. package/lib/geom/Matrix3D.ts +228 -0
  911. package/lib/geom/Orientation3D.ts +43 -0
  912. package/lib/geom/PerspectiveProjection.ts +1 -0
  913. package/lib/geom/Point.ts +201 -0
  914. package/lib/geom/Rectangle.ts +477 -0
  915. package/lib/geom/Transform.ts +105 -0
  916. package/lib/geom/Utils3D.ts +36 -0
  917. package/lib/geom/Vector3D.ts +438 -0
  918. package/lib/globalization/LocaleID.ts +96 -0
  919. package/lib/globalization/NumberFormatter.ts +551 -0
  920. package/lib/globalization/StringTools.ts +147 -0
  921. package/lib/greensock/TweenLite.ts +14 -0
  922. package/lib/greensock/easing/Linear.ts +4 -0
  923. package/lib/greensock/easing/Power.ts +3 -0
  924. package/lib/greensock/easing/Power1.ts +2 -0
  925. package/lib/greensock/easing/Power2.ts +2 -0
  926. package/lib/greensock/easing/Power3.ts +2 -0
  927. package/lib/greensock/easing/Power4.ts +2 -0
  928. package/lib/greensock/motionPaths/RectanglePath2D.ts +1 -0
  929. package/lib/greensock/plugins/RoundPropsPlugin.ts +1 -0
  930. package/lib/link.ts +669 -0
  931. package/lib/media/ID3Info.ts +69 -0
  932. package/lib/media/Sound.ts +532 -0
  933. package/lib/media/SoundChannel.ts +160 -0
  934. package/lib/media/SoundLoaderContext.ts +104 -0
  935. package/lib/media/SoundMixer.ts +152 -0
  936. package/lib/media/SoundTransform.ts +137 -0
  937. package/lib/net/FileFilter.ts +32 -0
  938. package/lib/net/FileReference.ts +293 -0
  939. package/lib/net/LocalConnection.ts +267 -0
  940. package/lib/net/NetConnection.ts +435 -0
  941. package/lib/net/Responder.ts +57 -0
  942. package/lib/net/SharedObject.ts +365 -0
  943. package/lib/net/Socket.ts +251 -0
  944. package/lib/net/URLLoader.ts +144 -0
  945. package/lib/net/URLLoaderDataFormat.ts +1 -0
  946. package/lib/net/URLRequest.ts +135 -0
  947. package/lib/net/URLRequestMethod.ts +1 -0
  948. package/lib/net/URLVariables.ts +84 -0
  949. package/lib/net/navigateToURL.ts +5 -0
  950. package/lib/sampler/NewObjectSample.ts +40 -0
  951. package/lib/sampler/Sample.ts +23 -0
  952. package/lib/starling/core/Starling.ts +613 -0
  953. package/lib/starling/display/DisplayObject.ts +1 -0
  954. package/lib/starling/display/Image.ts +1 -0
  955. package/lib/starling/display/Quad.ts +7 -0
  956. package/lib/starling/display/Sprite.ts +1 -0
  957. package/lib/starling/display/Stage.ts +4 -0
  958. package/lib/starling/events/Event.ts +1 -0
  959. package/lib/starling/events/ResizeEvent.ts +5 -0
  960. package/lib/starling/events/Touch.ts +1 -0
  961. package/lib/starling/events/TouchEvent.ts +1 -0
  962. package/lib/starling/events/TouchPhase.ts +1 -0
  963. package/lib/starling/textures/RenderTexture.ts +3 -0
  964. package/lib/starling/textures/Texture.ts +1 -0
  965. package/lib/starling/utils/SystemUtil.ts +3 -0
  966. package/lib/system/ApplicationDomain.ts +279 -0
  967. package/lib/system/Capabilities.ts +265 -0
  968. package/lib/system/FSCommand.ts +20 -0
  969. package/lib/system/IME.ts +157 -0
  970. package/lib/system/LoaderContext.ts +449 -0
  971. package/lib/system/Security.ts +119 -0
  972. package/lib/system/SecurityDomain.ts +9 -0
  973. package/lib/system/System.ts +225 -0
  974. package/lib/system/TouchscreenType.ts +37 -0
  975. package/lib/text/AntiAliasType.ts +1 -0
  976. package/lib/text/CSMSettings.ts +25 -0
  977. package/lib/text/Font.ts +60 -0
  978. package/lib/text/FontStyle.ts +18 -0
  979. package/lib/text/FontType.ts +18 -0
  980. package/lib/text/GridFitType.ts +1 -0
  981. package/lib/text/StaticText.ts +41 -0
  982. package/lib/text/StyleSheet.ts +201 -0
  983. package/lib/text/TextColorType.ts +15 -0
  984. package/lib/text/TextDisplayMode.ts +16 -0
  985. package/lib/text/TextExtent.ts +25 -0
  986. package/lib/text/TextField.ts +1358 -0
  987. package/lib/text/TextFieldAutoSize.ts +1 -0
  988. package/lib/text/TextFieldType.ts +1 -0
  989. package/lib/text/TextFormat.ts +222 -0
  990. package/lib/text/TextFormatAlign.ts +1 -0
  991. package/lib/text/TextFormatDisplay.ts +19 -0
  992. package/lib/text/TextInteractionMode.ts +1 -0
  993. package/lib/text/TextLineMetrics.ts +72 -0
  994. package/lib/text/TextRenderer.ts +70 -0
  995. package/lib/text/TextRun.ts +56 -0
  996. package/lib/text/TextSnapshot.ts +73 -0
  997. package/lib/text/engine/BreakOpportunity.ts +17 -0
  998. package/lib/text/engine/CFFHinting.ts +15 -0
  999. package/lib/text/engine/ContentElement.ts +123 -0
  1000. package/lib/text/engine/DigitCase.ts +19 -0
  1001. package/lib/text/engine/DigitWidth.ts +19 -0
  1002. package/lib/text/engine/EastAsianJustifier.ts +50 -0
  1003. package/lib/text/engine/ElementFormat.ts +323 -0
  1004. package/lib/text/engine/FontDescription.ts +114 -0
  1005. package/lib/text/engine/FontLookup.ts +18 -0
  1006. package/lib/text/engine/FontMetrics.ts +47 -0
  1007. package/lib/text/engine/FontPosture.ts +18 -0
  1008. package/lib/text/engine/FontWeight.ts +18 -0
  1009. package/lib/text/engine/GraphicElement.ts +69 -0
  1010. package/lib/text/engine/GroupElement.ts +123 -0
  1011. package/lib/text/engine/JustificationStyle.ts +19 -0
  1012. package/lib/text/engine/Kerning.ts +19 -0
  1013. package/lib/text/engine/LigatureLevel.ts +21 -0
  1014. package/lib/text/engine/LineJustification.ts +20 -0
  1015. package/lib/text/engine/NativehacksForTLF.ts +58 -0
  1016. package/lib/text/engine/RenderingMode.ts +18 -0
  1017. package/lib/text/engine/SpaceJustifier.ts +57 -0
  1018. package/lib/text/engine/TabAlignment.ts +20 -0
  1019. package/lib/text/engine/TabStop.ts +61 -0
  1020. package/lib/text/engine/TextBaseline.ts +23 -0
  1021. package/lib/text/engine/TextBlock.ts +583 -0
  1022. package/lib/text/engine/TextElement.ts +49 -0
  1023. package/lib/text/engine/TextJustifier.ts +46 -0
  1024. package/lib/text/engine/TextLine.ts +434 -0
  1025. package/lib/text/engine/TextLineCreationResult.ts +20 -0
  1026. package/lib/text/engine/TextLineMirrorRegion.ts +62 -0
  1027. package/lib/text/engine/TextLineValidity.ts +20 -0
  1028. package/lib/text/engine/TextRotation.ts +21 -0
  1029. package/lib/text/engine/TypographicCase.ts +22 -0
  1030. package/lib/text/ime/CompositionAttributeRange.ts +29 -0
  1031. package/lib/text/ime/IIMEClient.ts +31 -0
  1032. package/lib/ui/ContextMenu.ts +128 -0
  1033. package/lib/ui/ContextMenuBuiltInItems.ts +104 -0
  1034. package/lib/ui/ContextMenuClipboardItems.ts +93 -0
  1035. package/lib/ui/ContextMenuItem.ts +60 -0
  1036. package/lib/ui/GameInput.ts +49 -0
  1037. package/lib/ui/GameInputControl.ts +76 -0
  1038. package/lib/ui/GameInputControlType.ts +25 -0
  1039. package/lib/ui/GameInputDevice.ts +103 -0
  1040. package/lib/ui/GameInputFinger.ts +23 -0
  1041. package/lib/ui/GameInputHand.ts +22 -0
  1042. package/lib/ui/Keyboard.ts +394 -0
  1043. package/lib/ui/Mouse.ts +70 -0
  1044. package/lib/ui/MouseCursorData.ts +44 -0
  1045. package/lib/ui/Multitouch.ts +117 -0
  1046. package/lib/ui/MultitouchInputMode.ts +27 -0
  1047. package/lib/utils/AwayDate.ts +64 -0
  1048. package/lib/utils/ByteArray.ts +1 -0
  1049. package/lib/utils/CompressionAlgorithm.ts +7 -0
  1050. package/lib/utils/Dictionary.ts +1 -0
  1051. package/lib/utils/Endian.ts +15 -0
  1052. package/lib/utils/IDataInput.ts +194 -0
  1053. package/lib/utils/IDataOutput.ts +147 -0
  1054. package/lib/utils/IExternalizable.ts +37 -0
  1055. package/lib/utils/Timer.ts +115 -0
  1056. package/lib/utils/Trace.ts +33 -0
  1057. package/lib/utils/clearInterval.ts +8 -0
  1058. package/lib/utils/clearTimeout.ts +8 -0
  1059. package/lib/utils/describeType.ts +82 -0
  1060. package/lib/utils/escapeMultiByte.ts +29 -0
  1061. package/lib/utils/getAliasName.ts +7 -0
  1062. package/lib/utils/getDefinitionByName.ts +13 -0
  1063. package/lib/utils/getQualifiedClassName.ts +14 -0
  1064. package/lib/utils/getQualifiedSuperclassName.ts +26 -0
  1065. package/lib/utils/getTimer.ts +20 -0
  1066. package/lib/utils/setInterval.ts +20 -0
  1067. package/lib/utils/setTimeout.ts +20 -0
  1068. package/lib/utils/unescapeMultiByte.ts +27 -0
  1069. package/lib/xml/XML.ts +115 -0
  1070. package/lib/xml/XMLDocumentAway.ts +142 -0
  1071. package/lib/xml/XMLList.ts +449 -0
  1072. package/lib/xml/XMLNode.ts +326 -0
  1073. package/lib/xml/XMLNodeType.ts +48 -0
  1074. package/package.json +78 -4
  1075. package/rollup.config.js +40 -0
  1076. package/tsconfig.json +18 -0
@@ -0,0 +1,1553 @@
1
+ import { __extends } from "tslib";
2
+ import { Point as AwayPoint, AbstractMethodError, Debug } from '@awayjs/core';
3
+ import { EventDispatcher, BroadcastEventDispatchQueue } from '../events/EventDispatcher';
4
+ import { Event } from '../events/Event';
5
+ import { StaticEvents } from '../events/StaticEvents';
6
+ import { DisplayObject as AwayDisplayObject, TextField } from '@awayjs/scene';
7
+ import { PickGroup } from '@awayjs/view';
8
+ import { constructClassFromSymbol } from '@awayfl/avm2';
9
+ import { AVMStage } from '@awayfl/swf-loader';
10
+ import { FilterBuilder } from '../filters/FilterBuilder';
11
+ var _v = new AwayPoint();
12
+ /**
13
+ * AS not allow NaN and infinity as MC property value
14
+ * @param v
15
+ */
16
+ var clampASValues = function (v) {
17
+ if (isNaN(v))
18
+ return 0;
19
+ if (v === Infinity || v === -Infinity) {
20
+ return -107374182.4;
21
+ }
22
+ return v;
23
+ };
24
+ var DisplayObject = /** @class */ (function (_super) {
25
+ __extends(DisplayObject, _super);
26
+ /**
27
+ *
28
+ *
29
+ * these events are handled from DisplayObjectContainer.
30
+ * nothing really to much needs to be cnnected to awayjs.
31
+ *
32
+ * [broadcast event] Dispatched when the playhead is entering a new
33
+ * frame.
34
+ * @eventType flash.events.Event.ENTER_FRAME
35
+ [Event(name="enterFrame", type="flash.events.Event")]
36
+
37
+ * [broadcast event] Dispatched after the constructors of frame displayobjects have run
38
+ * but before frame scripts have run.
39
+ * @eventType flash.events.Event.FRAME_CONSTRUCTED
40
+ [Event(name="frameConstructed", type="flash.events.Event")]
41
+
42
+ * [broadcast event] Dispatched when the playhead is exiting the current frame.
43
+ * @eventType flash.events.Event.EXIT_FRAME
44
+ [Event(name="exitFrame", type="flash.events.Event")]
45
+
46
+ * [broadcast event] Dispatched when the display list is about to be updated and rendered.
47
+ * @eventType flash.events.Event.RENDER
48
+ [Event(name="render", type="flash.events.Event")]
49
+
50
+ * Dispatched when a displayobject is about to be removed from the display list,
51
+ * either directly or through the removal of a sub tree in which the displayobject is contained.
52
+ * @eventType flash.events.Event.REMOVED_FROM_STAGE
53
+ [Event(name="removedFromStage", type="flash.events.Event")]
54
+
55
+ * Dispatched when a displayobject is about to be removed from the display list.
56
+ * @eventType flash.events.Event.REMOVED
57
+ [Event(name="removed", type="flash.events.Event")]
58
+
59
+ * Dispatched when a displayobject is added to the on stage display list,
60
+ * either directly or through the addition of a sub tree in which the displayobject is contained.
61
+ * @eventType flash.events.Event.ADDED_TO_STAGE
62
+ [Event(name="addedToStage", type="flash.events.Event")]
63
+
64
+ * Dispatched when a displayobject is added to the display list.
65
+ * @eventType flash.events.Event.ADDED
66
+ [Event(name="added", type="flash.events.Event")]
67
+
68
+ * The DisplayObject class is the base class for all anys that can be placed on
69
+ * the display list. The display list manages all anys displayed in the Flash runtimes.
70
+ * Use the DisplayObjectContainer class to arrange the displayobjects in the display list.
71
+ * DisplayObjectContainer anys can have child displayobjects, while other displayobjects, such as
72
+ * Shape and TextField anys, are "leaf" nodes that have only parents and siblings, no children.
73
+ *
74
+ * <p class="- topic/p ">The DisplayObject class supports basic ality like the
75
+ * <i class="+ topic/ph hi-d/i ">x</i> and <i class="+ topic/ph hi-d/i ">y</i> position of
76
+ * an any, as well as more advanced properties of the any such as its transformation matrix.
77
+ * </p><p class="- topic/p ">DisplayObject is an abstract base class; therefore,
78
+ * you cannot call DisplayObject directly. Invoking
79
+ * <codeph class="+ topic/ph pr-d/codeph ">new DisplayObject()</codeph> console.logs
80
+ * an <codeph class="+ topic/ph pr-d/codeph ">ArgumentError</codeph> exception. </p>
81
+ * <p class="- topic/p ">All displayobjects inherit from the DisplayObject class.</p>
82
+ * <p class="- topic/p ">The DisplayObject class itself does not include any APIs for rendering content onscreen.
83
+ * For that reason, if you want create a custom subclass of the DisplayObject class, you will want
84
+ * to extend one of its subclasses that do have APIs for rendering content onscreen,
85
+ * such as the Shape, Sprite, Bitmap, SimpleButton, TextField, or MovieClip class.</p>
86
+ * <p class="- topic/p ">The DisplayObject class contains several broadcast events. Normally, the target
87
+ * of any particular event is a specific DisplayObject instance. For example,
88
+ * the target of an <codeph class="+ topic/ph pr-d/codeph ">added</codeph>
89
+ * event is the specific DisplayObject instance
90
+ * that was added to the display list. Having a single target restricts the placement of
91
+ * event listeners to that target and in some cases the target's ancestors on the display list.
92
+ * With broadcast events, however, the target is not a specific DisplayObject instance,
93
+ * but rather all DisplayObject instances, including those that are not on the display list.
94
+ * This means that you can add a listener to any DisplayObject instance to listen for broadcast events.
95
+ * In addition to the broadcast events listed in the DisplayObject class's Events table,
96
+ * the DisplayObject class also inherits two broadcast events from the EventDispatcher
97
+ * class: <codeph class="+ topic/ph pr-d/codeph ">activate</codeph> and <codeph class="+ topic/ph pr-d/codeph ">
98
+ * deactivate</codeph>.</p><p class="- topic/p ">Some properties previously used
99
+ * in the ActionScript 1.0 and 2.0 MovieClip, TextField, and Button
100
+ * classes (such as <codeph class="+ topic/ph pr-d/codeph ">_alpha</codeph>,
101
+ * <codeph class="+ topic/ph pr-d/codeph ">_height</codeph>,
102
+ * <codeph class="+ topic/ph pr-d/codeph ">_name</codeph>,
103
+ * <codeph class="+ topic/ph pr-d/codeph ">_width</codeph>,
104
+ * <codeph class="+ topic/ph pr-d/codeph ">_x</codeph>,
105
+ * <codeph class="+ topic/ph pr-d/codeph ">_y</codeph>, and others) have equivalents in the ActionScript 3.0
106
+ * DisplayObject class that are renamed so that they no longer begin with the underscore (_) character.</p>
107
+ * <p class="- topic/p ">For more information, see the "Display Programming" chapter of the
108
+ * <i class="+ topic/ph hi-d/i ">ActionScript 3.0 Developer's Guide</i>.</p>
109
+
110
+ */
111
+ function DisplayObject() {
112
+ var _this = _super.call(this) || this;
113
+ // hack for TFL to return correct width / height for TextLine
114
+ _this._forceWidth = 0;
115
+ _this._forceHeight = 0;
116
+ /**
117
+ * We can't apply props before call constructor, store value
118
+ * @private
119
+ */
120
+ _this.$lazyConstructProperty = {};
121
+ DisplayObject.applyLazy(_this);
122
+ _this._filters = _this._filters || _this.sec.createArrayUnsafe([]);
123
+ _this._blockedByScript = false;
124
+ _this._ctBlockedByScript = false;
125
+ _this._visibilityByScript = false;
126
+ // We should disable it and enable ONLY in interactiveObject
127
+ _this.adaptee.mouseEnabled = false;
128
+ // needed, because `this.stage` must already be available when constructor of extending classes are executed
129
+ _this._stage = _this.activeStage;
130
+ // no eventMapping needed for the DisplayObject-events.
131
+ // they can all be dispatched without listening on other objects
132
+ // still need to create a dummy mapping with empty message, in order to have them registered
133
+ // (we want unknown events to fail when they try to register in addEventListener
134
+ _this.eventMappingExtern[Event.ENTER_FRAME] = '';
135
+ _this.eventMappingExtern[Event.FRAME_CONSTRUCTED] = '';
136
+ _this.eventMappingExtern[Event.EXIT_FRAME] = '';
137
+ _this.eventMappingExtern[Event.RENDER] = '';
138
+ _this.eventMappingExtern[Event.REMOVED_FROM_STAGE] = '';
139
+ _this.eventMappingExtern[Event.REMOVED] = '';
140
+ _this.eventMappingExtern[Event.ADDED_TO_STAGE] = '';
141
+ _this.eventMappingExtern[Event.ADDED] = '';
142
+ _this._transform = new _this.sec.flash.geom.Transform(_this.adaptee.transform);
143
+ return _this;
144
+ }
145
+ DisplayObject.defineLazy = function (obj, name, value) {
146
+ if (obj._adaptee) {
147
+ return false;
148
+ }
149
+ if (!obj.$lazyConstructProperty) {
150
+ obj.$lazyConstructProperty = {};
151
+ }
152
+ obj.$lazyConstructProperty[name] = value;
153
+ return true;
154
+ };
155
+ DisplayObject.applyLazy = function (obj) {
156
+ if (!obj.$lazyConstructProperty) {
157
+ return;
158
+ }
159
+ for (var prop in obj.$lazyConstructProperty) {
160
+ if (prop in obj) {
161
+ obj[prop] = obj.$lazyConstructProperty[prop];
162
+ }
163
+ }
164
+ obj.$lazyConstructProperty = null;
165
+ };
166
+ DisplayObject.prototype.toString = function () {
167
+ return "[object ".concat(this.classInfo.instanceInfo.multiname.name, "]");
168
+ };
169
+ DisplayObject.prototype.applySymbol = function () {
170
+ };
171
+ DisplayObject.prototype.dispatchStaticEvent = function (eventName, target) {
172
+ if (target === void 0) { target = null; }
173
+ if (!StaticEvents.events[eventName])
174
+ StaticEvents.events[eventName] = new this.sec.flash.events.Event(eventName);
175
+ StaticEvents.events[eventName].target = target;
176
+ this.dispatchEvent(StaticEvents.events[eventName]);
177
+ };
178
+ DisplayObject.prototype.dispatch_ADDED_TO_STAGE = function (dispatchForThisChild) {
179
+ if (dispatchForThisChild === void 0) { dispatchForThisChild = false; }
180
+ if (dispatchForThisChild) {
181
+ this.adaptee.hasDispatchedAddedToStage = true;
182
+ if (!StaticEvents.events[Event.ADDED_TO_STAGE])
183
+ StaticEvents.events[Event.ADDED_TO_STAGE] =
184
+ new this.sec.flash.events.Event(Event.ADDED_TO_STAGE);
185
+ StaticEvents.events[Event.ADDED_TO_STAGE].target = this;
186
+ this.dispatchEvent(StaticEvents.events[Event.ADDED_TO_STAGE]);
187
+ }
188
+ };
189
+ DisplayObject.prototype.dispatch_REMOVED_FROM_STAGE = function (dispatchForThisChild) {
190
+ if (dispatchForThisChild === void 0) { dispatchForThisChild = false; }
191
+ if (dispatchForThisChild) {
192
+ this.adaptee.hasDispatchedAddedToStage = false;
193
+ if (!StaticEvents.events[Event.REMOVED_FROM_STAGE])
194
+ StaticEvents.events[Event.REMOVED_FROM_STAGE] =
195
+ new this.sec.flash.events.Event(Event.REMOVED_FROM_STAGE);
196
+ StaticEvents.events[Event.REMOVED_FROM_STAGE].target = this;
197
+ this.dispatchEvent(StaticEvents.events[Event.REMOVED_FROM_STAGE]);
198
+ }
199
+ };
200
+ DisplayObject.prototype.dispatchStaticBroadCastEvent = function (eventName) {
201
+ if (!StaticEvents.events[eventName])
202
+ StaticEvents.events[eventName] = new this.sec.flash.events.Event(eventName);
203
+ BroadcastEventDispatchQueue.getInstance().dispatchEvent(StaticEvents.events[eventName]);
204
+ };
205
+ DisplayObject.prototype.updateFilters = function (newFilters) {
206
+ var filters = [];
207
+ if (newFilters && newFilters.length) {
208
+ for (var _i = 0, newFilters_1 = newFilters; _i < newFilters_1.length; _i++) {
209
+ var filter = newFilters_1[_i];
210
+ var asFilter = FilterBuilder.FromUntyped(filter, this.sec);
211
+ asFilter && filters.push(asFilter);
212
+ }
213
+ }
214
+ this.filters = this.sec.createArrayUnsafe(filters);
215
+ };
216
+ DisplayObject.prototype.createAdaptee = function () {
217
+ return new AwayDisplayObject();
218
+ };
219
+ DisplayObject.prototype.mapAdaptee = function (adaptee) {
220
+ if (adaptee) {
221
+ // if (!adaptee.partition)
222
+ // adaptee.partition = new SceneGraphPartition(adaptee);
223
+ adaptee.adapter = this;
224
+ }
225
+ return adaptee;
226
+ };
227
+ Object.defineProperty(DisplayObject.prototype, "activeStage", {
228
+ get: function () {
229
+ /*if ((<SecurityDomain> this.sec).flash.display.DisplayObject.axClass._activeStage == null) {
230
+ console.log("ERROR: a Stage must have been created before any Sprite can be created!")
231
+ }*/
232
+ return this.sec.flash.display.DisplayObject.axClass._activeStage;
233
+ },
234
+ enumerable: false,
235
+ configurable: true
236
+ });
237
+ // use to dispatch events on a object and all its childs
238
+ // overwritten in DisplayObjectContainer to work recursivly on children
239
+ // used for:
240
+ // - REMOVED_FROM_STAGE
241
+ // - ADDED_TO_STAGE
242
+ DisplayObject.prototype.dispatchEventRecursive = function (event) { this.dispatchEvent(event); };
243
+ Object.defineProperty(DisplayObject.prototype, "node", {
244
+ // --------------------- stuff needed because of implementing the existing IDisplayObjectAdapter
245
+ get: function () {
246
+ if (!this._node)
247
+ this._node = AVMStage.instance().view.getNode(this._adaptee);
248
+ return this._node;
249
+ },
250
+ enumerable: false,
251
+ configurable: true
252
+ });
253
+ Object.defineProperty(DisplayObject.prototype, "adaptee", {
254
+ get: function () {
255
+ return this._adaptee || (this.adaptee = this.createAdaptee());
256
+ },
257
+ set: function (value) {
258
+ if (this._adaptee == value)
259
+ return;
260
+ if (this._adaptee)
261
+ this._adaptee.adapter = null;
262
+ this._adaptee = this.mapAdaptee(value);
263
+ },
264
+ enumerable: false,
265
+ configurable: true
266
+ });
267
+ DisplayObject.prototype.initAdapter = function () { };
268
+ DisplayObject.prototype.isBlockedByScript = function () {
269
+ //console.log("isBlockedByScript not implemented yet in flash/DisplayObject");
270
+ return this._blockedByScript;
271
+ };
272
+ DisplayObject.prototype.isVisibilityByScript = function () {
273
+ //console.log("isVisibilityByScript not implemented yet in flash/DisplayObject");
274
+ return this._visibilityByScript;
275
+ };
276
+ DisplayObject.prototype.isColorTransformByScript = function () {
277
+ //console.log("isVisibilityByScript not implemented yet in flash/DisplayObject");
278
+ return this._ctBlockedByScript;
279
+ };
280
+ DisplayObject.prototype.freeFromScript = function () {
281
+ //console.log("freeFromScript not implemented yet in flash/DisplayObject");
282
+ this._blockedByScript = false;
283
+ this._ctBlockedByScript = false;
284
+ this._visibilityByScript = false;
285
+ };
286
+ DisplayObject.prototype.clone = function () {
287
+ if (!this._symbol) {
288
+ throw ('_symbol not defined when cloning movieclip');
289
+ }
290
+ var clone = constructClassFromSymbol(this._symbol, this._symbol.symbolClass);
291
+ clone.axInitializer();
292
+ clone.loaderInfo = this.loaderInfo;
293
+ this.adaptee.copyTo(clone.adaptee);
294
+ return clone;
295
+ };
296
+ DisplayObject.prototype.dispose = function () {
297
+ throw new AbstractMethodError();
298
+ };
299
+ /**
300
+ * @inheritDoc
301
+ */
302
+ DisplayObject.prototype.disposeValues = function () {
303
+ this.adaptee = null;
304
+ };
305
+ Object.defineProperty(DisplayObject.prototype, "accessibilityProperties", {
306
+ //---------------------------original as3 properties / methods:
307
+ /**
308
+ * The current accessibility options for this displayobject. If you modify the accessibilityProperties
309
+ * property or any of the fields within accessibilityProperties, you must call
310
+ * the Accessibility.updateProperties() method to make your changes take effect.
311
+ *
312
+ * Note: For an any created in the Flash authoring environment, the value of accessibilityProperties
313
+ * is prepopulated with any information you entered in the Accessibility panel for
314
+ * that any.
315
+ */
316
+ get: function () {
317
+ // @todo
318
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'get accessibilityProperties', '');
319
+ return null;
320
+ },
321
+ set: function (value) {
322
+ // @todo
323
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'set accessibilityProperties', '');
324
+ },
325
+ enumerable: false,
326
+ configurable: true
327
+ });
328
+ Object.defineProperty(DisplayObject.prototype, "alpha", {
329
+ /**
330
+ * Indicates the alpha transparency value of the any specified.
331
+ * Valid values are 0 (fully transparent) to 1 (fully opaque).
332
+ * The default value is 1. displayobjects with alpha
333
+ * set to 0 are active, even though they are invisible.
334
+ */
335
+ get: function () {
336
+ return this.adaptee.alpha;
337
+ },
338
+ set: function (value) {
339
+ this._ctBlockedByScript = true;
340
+ this.adaptee.alpha = value;
341
+ },
342
+ enumerable: false,
343
+ configurable: true
344
+ });
345
+ Object.defineProperty(DisplayObject.prototype, "blendMode", {
346
+ /**
347
+ * A value from the BlendMode class that specifies which blend mode to use.
348
+ * A bitmap can be drawn internally in two ways. If you have a blend mode enabled or an
349
+ * external clipping mask, the bitmap is drawn by adding a bitmap-filled square shape to the vector
350
+ * render. If you attempt to set this property to an invalid value, Flash runtimes set the value
351
+ * to BlendMode.NORMAL.
352
+ *
353
+ * The blendMode property affects each pixel of the displayobject.
354
+ * Each pixel is composed of three constituent
355
+ * colors (red, green, and blue), and each constituent color has a value between 0x00 and 0xFF.
356
+ * Flash Player or Adobe AIR compares each constituent color of one pixel in the movie clip with
357
+ * the corresponding color of the pixel in the background. For example, if blendMode
358
+ * is set to BlendMode.LIGHTEN, Flash Player or Adobe AIR compares the red value of the displayobject with
359
+ * the red value of the background, and uses the lighter of the two as the
360
+ * value for the red component of the displayed color.The following table describes the blendMode settings.
361
+ * The BlendMode class defines string values you can use.
362
+ * The illustrations in the table show blendMode values applied to a circular
363
+ * displayobject (2) superimposed on another displayobject (1).
364
+ * BlendMode ConstantIllustrationDescription
365
+ * BlendMode.NORMAL
366
+ * The displayobject appears in front of the background. Pixel values of the displayobject
367
+ * override those of the background. Where the displayobject is transparent, the background is
368
+ * visible.BlendMode.LAYERForces the creation of a transparency group for the displayobject.
369
+ * This means that the display
370
+ * any is pre-composed in a temporary buffer before it is processed further. This is done
371
+ * automatically if the displayobject is pre-cached using bitmap caching or if the displayobject is
372
+ * a displayobject container with at least one child any with a blendMode
373
+ * setting other than BlendMode.NORMAL. Not supported under GPU rendering.
374
+ *
375
+ * BlendMode.MULTIPLYMultiplies the values of the displayobject constituent
376
+ * colors by the colors of the background color,
377
+ * and then normalizes by dividing by 0xFF,
378
+ * resulting in darker colors. This setting is commonly used for shadows and depth effects.
379
+ * For example, if a constituent color (such as red) of one pixel in the displayobject and the
380
+ * corresponding color of the pixel in the background both have the value 0x88, the multiplied
381
+ * result is 0x4840. Dividing by 0xFF yields a value of 0x48 for that constituent color,
382
+ * which is a darker shade than the color of the displayobject or the color of the background.
383
+ *
384
+ * BlendMode.SCREEN Multiplies the complement (inverse) of the displayobject color by the complement
385
+ * of the background color, resulting in a bleaching effect.
386
+ * This setting is commonly used for highlights or to remove black areas of the displayobject.
387
+ *
388
+ * BlendMode.LIGHTEN Selects the lighter of the constituent colors of the displayobject and the
389
+ * color of the background (the colors with the larger values).
390
+ * This setting is commonly used for superimposing type.
391
+ * For example, if the displayobject has a pixel with an RGB value of 0xFFCC33, and the background
392
+ * pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
393
+ * 0xFFF833 (because 0xFF > 0xDD, 0xCC < 0xF8, and 0x33 > 0x00 = 33).
394
+ * Not supported under GPU rendering.
395
+ *
396
+ * BlendMode.DARKEN Selects the darker of the constituent colors of the displayobject and the colors of the
397
+ * background (the colors with the smaller values). This setting is commonly used for superimposing type. *
398
+ * For example, if the displayobject has a pixel with an RGB value of 0xFFCC33, and the background
399
+ * pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
400
+ * 0xDDCC00 (because 0xFF > 0xDD, 0xCC < 0xF8, and 0x33 > 0x00 = 33).
401
+ * Not supported under GPU rendering.
402
+ *
403
+ * BlendMode.DIFFERENCE Compares the constituent colors of the displayobject with the colors
404
+ * of its background, and subtracts the darker of the values of the two constituent colors from the lighter value.
405
+ * This setting is commonly used for more vibrant colors. *
406
+ * For example, if the displayobject has a pixel with an RGB value of 0xFFCC33, and the background
407
+ * pixel has an RGB value of 0xDDF800, the resulting RGB value for the displayed pixel is
408
+ * 0x222C33 (because 0xFF - 0xDD = 0x22, 0xF8 - 0xCC = 0x2C, and 0x33 - 0x00 = 0x33).
409
+ *
410
+ * BlendMode.ADD Adds the values of the constituent colors of the displayobject to the colors of its background,
411
+ * applying a ceiling of 0xFF. This setting is commonly used for animating a lightening dissolve between
412
+ * two anys. *
413
+ * For example, if the displayobject has a pixel with an RGB value of 0xAAA633, and the background
414
+ * pixel has an RGB value of 0xDD2200, the resulting RGB value for the displayed pixel is
415
+ * 0xFFC833 (because 0xAA + 0xDD > 0xFF, 0xA6 + 0x22 = 0xC8, and 0x33 + 0x00 = 0x33).
416
+ *
417
+ * BlendMode.SUBTRACTSubtracts the values of the constituent colors in the displayobject from the values of the
418
+ * background color, applying a floor of 0. This setting is commonly used for animating a
419
+ * darkening dissolve between two anys.
420
+ * For example, if the displayobject has a pixel with an RGB value of 0xAA2233, and the background
421
+ * pixel has an RGB value of 0xDDA600, the resulting RGB value for the displayed pixel is
422
+ * 0x338400 (because 0xDD - 0xAA = 0x33, 0xA6 - 0x22 = 0x84, and 0x00 - 0x33 < 0x00).
423
+ *
424
+ * BlendMode.INVERT Inverts the background.
425
+ * BlendMode.ALPHA Applies the alpha value of each pixel of the displayobject to the background.
426
+ * This requires the blendMode setting of the parent displayobject to be set to BlendMode.LAYER.
427
+ * For example, in the illustration, the parent displayobject, which is a white background,
428
+ * has blendMode = BlendMode.LAYER. Not supported under GPU rendering.
429
+ *
430
+ * BlendMode.ERASE Erases the background based on the alpha value of the displayobject.
431
+ * This requires the blendMode of the parent displayobject to be set to BlendMode.LAYER.
432
+ * For example, in the illustration, the parent displayobject, which is a white background, has
433
+ * blendMode = BlendMode.LAYER. Not supported under GPU rendering.
434
+ *
435
+ * BlendMode.OVERLAY Adjusts the color of each pixel based on the darkness of the background.
436
+ * If the background is lighter than 50% gray, the displayobject and background colors are
437
+ * screened, which results in a lighter color. If the background is darker than 50% gray,
438
+ * the colors are multiplied, which results in a darker color.
439
+ * This setting is commonly used for shading effects. Not supported under GPU rendering.
440
+ *
441
+ * BlendMode.HARDLIGHTAdjusts the color of each pixel based on the darkness of the displayobject.
442
+ * If the displayobject is lighter than 50% gray, the displayobject and background colors are
443
+ * screened, which results in a lighter color. If the displayobject is darker than 50% gray,
444
+ * the colors are multiplied, which results in a darker color.
445
+ * This setting is commonly used for shading effects. Not supported under GPU rendering.
446
+ *
447
+ * BlendMode.SHADERN/AAdjusts the color using a custom shader routine. The shader that is used is specified
448
+ * as the Shader instance assigned to the blendShader property. Setting the
449
+ * blendShader property of a displayobject to a Shader instance
450
+ * automatically sets the displayobject's blendMode property to
451
+ * BlendMode.SHADER. If the blendMode property is set to
452
+ * BlendMode.SHADER without first setting the blendShader property,
453
+ * the blendMode property is set to BlendMode.NORMAL. Not supported under GPU rendering.
454
+ */
455
+ get: function () {
456
+ return this._adaptee.blendMode;
457
+ },
458
+ set: function (value) {
459
+ this._adaptee.blendMode = value;
460
+ },
461
+ enumerable: false,
462
+ configurable: true
463
+ });
464
+ Object.defineProperty(DisplayObject.prototype, "blendShader", {
465
+ /**
466
+ * Sets a shader that is used for blending the foreground and background. When the
467
+ * blendMode property is set to BlendMode.SHADER, the specified
468
+ * Shader is used to create the blend mode output for the displayobject.
469
+ *
470
+ * Setting the blendShader property of a displayobject to a Shader instance
471
+ * automatically sets the displayobject's blendMode property to
472
+ * BlendMode.SHADER. If the blendShader property is set (which sets the
473
+ * blendMode property to BlendMode.SHADER), then the value of the
474
+ * blendMode property is changed, the blend mode can be reset to use the blend
475
+ * shader simply by setting the blendMode property to BlendMode.SHADER.
476
+ * The blendShader property does not need to be set again except to change the
477
+ * shader that's used for the blend mode.The Shader assigned to the blendShader property must specify at least two
478
+ * image4 inputs. The inputs do not need to be specified in code using the
479
+ * associated ShaderInput anys' input properties. The background displayobject
480
+ * is automatically
481
+ * used as the first input (the input with index 0). The foreground displayobject
482
+ * is used as the second input (the input with index 1). A shader used as a blend
483
+ * shader can specify more than two inputs. In that case, any additional input must be specified
484
+ * by setting its ShaderInput instance's input property.
485
+ * When you assign a Shader instance to this property the shader is copied internally. The
486
+ * blend operation uses that internal copy, not a reference to the original shader. Any changes
487
+ * made to the shader, such as changing a parameter value, input, or bytecode, are not applied
488
+ * to the copied shader that's used for the blend mode.
489
+ * @langversion 3.0
490
+ * @playerversion Flash 10
491
+ * @playerversion AIR 1.5
492
+ * @console.logs ArgumentError When the shader output type is not compatible with this operation
493
+ * (the shader must specify a pixel4
494
+ * output).
495
+ * @console.logs ArgumentError When the shader specifies fewer than two image inputs or the first
496
+ * two inputs are not image4 inputs.
497
+ * @console.logs ArgumentError When the shader specifies an image input that isn't provided.
498
+ * @console.logs ArgumentError When a Byte[] or Vector.<number> instance is used as
499
+ * an input and the width
500
+ * and height properties aren't specified for the
501
+ * ShaderInput, or the specified values don't match the amount of
502
+ * data in the input any. See the ShaderInput.input
503
+ * property for more information.
504
+ */
505
+ set: function (_value) {
506
+ // @todo
507
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'set blendShader', '');
508
+ },
509
+ enumerable: false,
510
+ configurable: true
511
+ });
512
+ Object.defineProperty(DisplayObject.prototype, "cacheAsBitmap", {
513
+ /**
514
+ * If set to true, Flash runtimes cache an internal bitmap representation of the
515
+ * displayobject. This caching can increase performance for displayobjects that contain complex
516
+ * vector content.
517
+ *
518
+ * All vector data for a displayobject that has a cached bitmap is drawn to the bitmap
519
+ * instead of the main display. If cacheAsBitmapMatrix is null or unsupported,
520
+ * the bitmap is then copied to the main display as unstretched, unrotated pixels snapped to
521
+ * the nearest pixel boundaries. Pixels are mapped 1 to 1 with
522
+ * the parent any. If the bounds of the bitmap change, the bitmap is recreated instead
523
+ * of being stretched.If cacheAsBitmapMatrix is non-null and supported, the any is drawn to the off-screen bitmap
524
+ * using that matrix and the stretched and/or rotated results of that rendering are used
525
+ * to draw the any to the main display.No internal bitmap is created unless the cacheAsBitmap property is set to
526
+ * true.After you set the cacheAsBitmap property to true,
527
+ * the rendering does not change, however the displayobject performs pixel snapping
528
+ * automatically. The animation speed can be significantly faster depending
529
+ * on the complexity of the vector content.
530
+ * The cacheAsBitmap property is automatically set to true
531
+ * whenever you apply a filter to a displayobject (when its filter [] is not empty),
532
+ * and if a displayobject has a filter applied to it, cacheAsBitmap is reported as
533
+ * true for that displayobject, even if you set the property to false.
534
+ * If you clear all filters for a displayobject, the cacheAsBitmap setting changes to
535
+ * what it was last set to.A displayobject does not use a bitmap even if the cacheAsBitmap
536
+ * property is set to true and instead renders from vector data in the following cases:The bitmap is too large.
537
+ * In AIR 1.5 and Flash Player 10, the maximum size for a bitmap image is 8,191 pixels in width or height,
538
+ * and the total number of pixels cannot exceed 16,777,215 pixels. (So, if a bitmap image is 8,191 pixels
539
+ * wide, it can only be 2,048 pixels high.) In Flash Player 9 and earlier, the limitation is
540
+ * is 2880 pixels in height and 2,880 pixels in width.The bitmap fails to allocate (out of memory error).
541
+ * The cacheAsBitmap property is best used with movie clips that have
542
+ * mostly static content and that do not scale and rotate frequently. With such movie
543
+ * clips, cacheAsBitmap can lead to performance increases when the
544
+ * movie clip is translated (when its x and y position is changed).
545
+ */
546
+ get: function () {
547
+ return this.adaptee.cacheAsBitmap;
548
+ },
549
+ set: function (value) {
550
+ this.adaptee.cacheAsBitmap = value;
551
+ },
552
+ enumerable: false,
553
+ configurable: true
554
+ });
555
+ Object.defineProperty(DisplayObject.prototype, "filters", {
556
+ /**
557
+ * An indexed [] that contains each filter any currently associated with the displayobject.
558
+ * The flash.filters package contains several classes that define specific filters you can
559
+ * use.
560
+ *
561
+ * Filters can be applied in Flash Professional at design time, or at run time by using
562
+ * ActionScript code. To apply a filter by using ActionScript, you must make a temporary copy of the
563
+ * entire filters [], modify the temporary [], then assign the value
564
+ * of the temporary [] back to the filters []. You cannot directly
565
+ * add a new filter any to the filters [].To add a filter by using ActionScript,
566
+ * perform the following steps (assume that the
567
+ * target displayobject is named myDisplayObject):Create a new filter any by using the constructor
568
+ * method of your chosen filter class.Assign the value of the myDisplayObject.filters [] to a temporary [], such
569
+ * as one named myFilters.Add the new filter any to the myFilters temporary [].
570
+ * Assign the value of the temporary [] to the myDisplayObject.filters [].
571
+ * If the filters [] is undefined, you do not need to use a temporary [].
572
+ * Instead, you can directly assign an [] literal that contains one or more filter anys that
573
+ * you create. The first example in the Examples section adds a drop shadow filter by using
574
+ * code that handles both defined and undefined filters []s.To modify an existing filter any,
575
+ * you must use the technique of modifying a copy of the filters []:
576
+ * Assign the value of the filters [] to a temporary [], such as one
577
+ * named myFilters.Modify the property by using the temporary [], myFilters. For example,
578
+ * to set the quality property of the first filter in the [], you could use the
579
+ * following code: myFilters[0].quality = 1;
580
+ * Assign the value of the temporary [] to the filters [].
581
+ * At load time, if a displayobject has an associated filter, it is marked to cache itself as a
582
+ * transparent bitmap. From this point forward, as long as the displayobject has a valid filter list,
583
+ * the player caches the displayobject as a bitmap. This source bitmap is used as a source
584
+ * image for the filter effects. Each displayobject usually has two bitmaps: one with the
585
+ * original unfiltered source displayobject and another for the final image after filtering.
586
+ * The final image is used when rendering. As long as the displayobject does not
587
+ * change, the final image does not need updating.
588
+ * The flash.filters package includes classes for filters. For example, to create a DropShadow
589
+ * filter, you would write:
590
+ * <codeblock>
591
+ *
592
+ * import flash.filters.DropShadowFilter
593
+ * var myFilter:DropShadowFilter =
594
+ * new DropShadowFilter (distance, angle, color, alpha, blurX, blurY, quality, inner, knockout)
595
+ *
596
+ * </codeblock>
597
+ * You can use the is operator to determine the type of filter assigned to
598
+ * each index position in the filter []. For example, the following code shows
599
+ * how to determine the position of the first filter in the filters [] that
600
+ * is a DropShadowFilter:
601
+ *
602
+ * <codeblock>
603
+ *
604
+ * import flash.text.TextField;
605
+ * import flash.filters.~~;
606
+ * var tf:TextField = new TextField();
607
+ * var filter1:DropShadowFilter = new DropShadowFilter();
608
+ * var filter2:GradientGlowFilter = new GradientGlowFilter();
609
+ * tf.filters = [filter1, filter2];
610
+ *
611
+ * tf.text = "DropShadow index: " + filterPosition(tf, DropShadowFilter).tostring(); // 0
612
+ * addChild(tf)
613
+ *
614
+ * filterPosition(DisplayObject:DisplayObject, filterClass:Class):int {
615
+ * for (var i:uint = 0; i < DisplayObject.filters.length; i++) {
616
+ * if (DisplayObject.filters[i] is filterClass) {
617
+ * return i;
618
+ * }
619
+ * }
620
+ * return -1;
621
+ * }
622
+ *
623
+ * </codeblock>
624
+ * Note: Since you cannot directly add a new filter any to the
625
+ * DisplayObject.filters [], the following code has no
626
+ * effect on the target displayobject, named myDisplayObject:
627
+ * <codeblock>
628
+ *
629
+ * myDisplayObject.filters.push(myDropShadow);
630
+ *
631
+ * </codeblock>
632
+ * @langversion 3.0
633
+ * @playerversion Flash 9
634
+ * @console.logs ArgumentError When filters includes a ShaderFilter and the shader
635
+ * output type is not compatible with this operation
636
+ * (the shader must specify a pixel4
637
+ * output).
638
+ * @console.logs ArgumentError When filters includes a ShaderFilter and the shader
639
+ * doesn't specify any image input or the first
640
+ * input is not an image4 input.
641
+ * @console.logs ArgumentError When filters includes a ShaderFilter and the shader
642
+ * specifies an image input that isn't provided.
643
+ * @console.logs ArgumentError When filters includes a ShaderFilter, a
644
+ * Byte[] or Vector.<number> instance as
645
+ * a shader input, and the width
646
+ * and height properties aren't specified for the
647
+ * ShaderInput any, or the specified values don't match the amount of
648
+ * data in the input data. See the ShaderInput.input
649
+ * property for more information.
650
+ */
651
+ get: function () {
652
+ return this._filters;
653
+ },
654
+ set: function (value) {
655
+ if (this._filters == value)
656
+ return;
657
+ this._filters = value;
658
+ //@ts-ignore
659
+ this._adaptee.filters = value === null || value === void 0 ? void 0 : value.value.map(function (e) { return e.toAwayObject(); });
660
+ },
661
+ enumerable: false,
662
+ configurable: true
663
+ });
664
+ Object.defineProperty(DisplayObject.prototype, "height", {
665
+ /**
666
+ * Indicates the height of the displayobject, in pixels.
667
+ * The height is calculated based on the bounds of the content of the displayobject.
668
+ * When you set the height property, the scaleY property is adjusted accordingly, as shown in the
669
+ * following code:
670
+ *
671
+ * <codeblock>
672
+ *
673
+ * var rect:Shape = new Shape();
674
+ * rect.graphics.beginFill(0xFF0000);
675
+ * rect.graphics.drawRect(0, 0, 100, 100);
676
+ * trace(rect.scaleY) // 1;
677
+ * rect.height = 200;
678
+ * trace(rect.scaleY) // 2;
679
+ * </codeblock>
680
+ * Except for TextField and Video anys, a displayobject with no content (such as an empty sprite) has a height
681
+ * of 0, even if you try to set height to a different value.
682
+ */
683
+ get: function () {
684
+ if (this._forceHeight != 0)
685
+ return this._forceHeight;
686
+ if (this.adaptee.isAsset(TextField)) {
687
+ return this.adaptee.height;
688
+ }
689
+ var box = this.getBoundsInternal(this.parent || this._stage);
690
+ return (box == null) ? 0 : Math.round(box.height * 20) / 20;
691
+ },
692
+ set: function (value) {
693
+ if (isNaN(value))
694
+ return;
695
+ value = clampASValues(value);
696
+ // round to twips
697
+ value = Math.round(value * 20) / 20;
698
+ this._blockedByScript = true;
699
+ // this should be done by overwriting the width-getter in TextField- but it doesnt work
700
+ if (this.adaptee.isAsset(TextField)) {
701
+ this.adaptee.height = value;
702
+ return;
703
+ }
704
+ PickGroup.getInstance().getBoundsPicker(this.node).height = value;
705
+ },
706
+ enumerable: false,
707
+ configurable: true
708
+ });
709
+ Object.defineProperty(DisplayObject.prototype, "loaderInfo", {
710
+ /**
711
+ * Returns a LoaderInfo any containing information about loading the file
712
+ * to which this displayobject belongs. The loaderInfo property is defined only
713
+ * for the root displayobject of a SWF file or for a loaded Bitmap (not for a Bitmap that is drawn
714
+ * with ActionScript). To find the loaderInfo any associated with the SWF file that contains
715
+ * a displayobject named myDisplayObject, use myDisplayObject.root.loaderInfo.
716
+ *
717
+ * A large SWF file can monitor its download by calling
718
+ * this.root.loaderInfo.addEventListener(Event.COMPLETE, func).
719
+ */
720
+ get: function () {
721
+ var _a;
722
+ return this._loaderInfo || ((_a = this.root) === null || _a === void 0 ? void 0 : _a._loaderInfo);
723
+ },
724
+ set: function (value) {
725
+ this._loaderInfo = value;
726
+ },
727
+ enumerable: false,
728
+ configurable: true
729
+ });
730
+ Object.defineProperty(DisplayObject.prototype, "mask", {
731
+ /**
732
+ * The calling displayobject is masked by the specified mask any.
733
+ * To ensure that masking works when the Stage is scaled, the mask displayobject
734
+ * must be in an active part of the display list. The mask any itself is not drawn.
735
+ * Set mask to null to remove the mask.
736
+ *
737
+ * To be able to scale a mask any, it must be on the display list. To be able to drag a mask Sprite any
738
+ * (by calling its startDrag() method), it must be on the display list. To call the
739
+ * startDrag() method for a mask sprite based on a mouseDown event
740
+ * being dispatched by the sprite, set the sprite's buttonMode property to true.
741
+ * When displayobjects are cached by setting the cacheAsBitmap property to
742
+ * true an the cacheAsBitmapMatrix property to a Matrix any,
743
+ * both the mask and the displayobject being masked must be part of the same cached
744
+ * bitmap. Thus, if the displayobject is cached, then the mask must be a child of the displayobject.
745
+ * If an ancestor of the displayobject on the display list is cached, then the mask must be a child of
746
+ * that ancestor or one of its descendents. If more than one ancestor of the masked any is cached,
747
+ * then the mask must be a descendent of the cached container closest to the masked any in the display list.
748
+ * Note: A single mask any cannot be used to mask more than one calling displayobject.
749
+ * When the mask is assigned to a second displayobject, it is removed as the mask of the first
750
+ * any, and that any's mask property becomes null.
751
+ */
752
+ /**
753
+ * Magic, timeline can assign a MC with name 'mask' but we should apply it as mask
754
+ * NOT ASSIGN DEFAULT! Because this value settings before execute constructor
755
+ */
756
+ get: function () {
757
+ var _a;
758
+ return ((_a = this.adaptee.mask) === null || _a === void 0 ? void 0 : _a.adapter) || null;
759
+ },
760
+ set: function (value) {
761
+ this.adaptee.mask = (value === null || value === void 0 ? void 0 : value.adaptee) || null;
762
+ },
763
+ enumerable: false,
764
+ configurable: true
765
+ });
766
+ Object.defineProperty(DisplayObject.prototype, "metaData", {
767
+ get: function () {
768
+ // @todo
769
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'get metaData', '');
770
+ return null;
771
+ },
772
+ set: function (_data) {
773
+ // @todo
774
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'set metaData', '');
775
+ },
776
+ enumerable: false,
777
+ configurable: true
778
+ });
779
+ Object.defineProperty(DisplayObject.prototype, "mouseX", {
780
+ /**
781
+ * Indicates the x coordinate of the mouse or user input device position, in pixels.
782
+ *
783
+ * Note: For a DisplayObject that has been rotated, the returned x coordinate will reflect the
784
+ * non-rotated Point.
785
+ */
786
+ get: function () {
787
+ _v.setTo(this._stage.mouseX, this._stage.mouseY);
788
+ this.node.globalToLocal(_v, _v);
789
+ return Math.floor(_v.x);
790
+ },
791
+ enumerable: false,
792
+ configurable: true
793
+ });
794
+ Object.defineProperty(DisplayObject.prototype, "mouseY", {
795
+ /**
796
+ * Indicates the y coordinate of the mouse or user input device position, in pixels.
797
+ *
798
+ * Note: For a DisplayObject that has been rotated, the returned y coordinate will reflect the
799
+ * non-rotated Point.
800
+ */
801
+ get: function () {
802
+ _v.setTo(this._stage.mouseX, this._stage.mouseY);
803
+ this.node.globalToLocal(_v, _v);
804
+ return Math.floor(_v.y);
805
+ },
806
+ enumerable: false,
807
+ configurable: true
808
+ });
809
+ Object.defineProperty(DisplayObject.prototype, "name", {
810
+ /**
811
+ * Indicates the instance name of the DisplayObject. The any can be identified in
812
+ * the child list of its parent displayobject container by calling the
813
+ * getChildByName() method of the displayobject container.
814
+ * @langversion 3.0
815
+ * @playerversion Flash 9
816
+ * @playerversion Lite 4
817
+ * @console.logs IllegalOperationError If you are attempting to set this property on an any that was
818
+ * placed on the timeline in the Flash authoring tool.
819
+ */
820
+ get: function () {
821
+ return this.adaptee.name;
822
+ },
823
+ set: function (value) {
824
+ this.adaptee.name = value;
825
+ },
826
+ enumerable: false,
827
+ configurable: true
828
+ });
829
+ Object.defineProperty(DisplayObject.prototype, "opaqueBackground", {
830
+ /**
831
+ * Specifies whether the displayobject is opaque with a certain background color.
832
+ * A transparent bitmap contains alpha
833
+ * channel data and is drawn transparently. An opaque bitmap has no alpha channel (and renders faster
834
+ * than a transparent bitmap). If the bitmap is opaque, you specify its own background color to use.
835
+ *
836
+ * If set to a number value, the surface is opaque (not transparent) with the RGB background
837
+ * color that the number specifies. If set to null (the default value), the display
838
+ * any has a transparent background.The opaqueBackground property is intended mainly for use with the
839
+ * cacheAsBitmap property, for rendering optimization. For displayobjects in which the
840
+ * cacheAsBitmap property is set to true, setting opaqueBackground can
841
+ * improve rendering performance.The opaque background region is not matched when calling the hitTestPoint()
842
+ * method with the shapeFlag parameter set to true.The opaque background region does not respond to mouse events.
843
+ */
844
+ get: function () {
845
+ // @todo
846
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'get opaqueBackground', '');
847
+ return null;
848
+ },
849
+ set: function (value) {
850
+ // @todo
851
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'set opaqueBackground', '');
852
+ },
853
+ enumerable: false,
854
+ configurable: true
855
+ });
856
+ Object.defineProperty(DisplayObject.prototype, "parent", {
857
+ /**
858
+ * Indicates the DisplayObjectContainer any that contains this displayobject. Use the parent
859
+ * property to specify a relative path to displayobjects that are above the
860
+ * current displayobject in the display list hierarchy.
861
+ *
862
+ * You can use parent to move up multiple levels in the display list as in the following:
863
+ * @console.logs SecurityError The parent displayobject belongs to a security sandbox
864
+ * to which you do not have access. You can avoid this situation by having
865
+ * the parent movie call the Security.allowDomain() method.
866
+ */
867
+ get: function () {
868
+ if (this.adaptee.parent == null
869
+ || this.adaptee.parent.adapter == null
870
+ || this.adaptee.parent.adapter == this.adaptee.parent) {
871
+ return null;
872
+ }
873
+ return this.adaptee.parent.adapter;
874
+ },
875
+ enumerable: false,
876
+ configurable: true
877
+ });
878
+ Object.defineProperty(DisplayObject.prototype, "root", {
879
+ /**
880
+ * For a displayobject in a loaded SWF file, the root property is the
881
+ * top-most displayobject in the portion of the display list's tree structure represented by that SWF file.
882
+ * For a Bitmap any representing a loaded image file, the root property is the Bitmap any
883
+ * itself. For the instance of the main class of the first SWF file loaded, the root property is the
884
+ * displayobject itself. The root property of the Stage any is the Stage any itself. The root
885
+ * property is set to null for any displayobject that has not been added to the display list, unless
886
+ * it has been added to a displayobject container that is off the display list but that is a child of the
887
+ * top-most displayobject in a loaded SWF file.
888
+ *
889
+ * For example, if you create a new Sprite any by calling the Sprite() constructor method,
890
+ * its root property is null until you add it to the display list (or to a display
891
+ * any container that is off the display list but that is a child of the top-most displayobject in a SWF file).
892
+ * For a loaded SWF file, even though the Loader any used to load the file may not be on the display list,
893
+ * the top-most displayobject in the SWF file has its root property set to itself. The Loader any
894
+ * does not have its root property set until it is added as a child of a displayobject for which the
895
+ * root property is set.
896
+ */
897
+ get: function () {
898
+ var _a, _b;
899
+ return this.adaptee.isAVMScene ? this : (_b = (_a = this.adaptee.parent) === null || _a === void 0 ? void 0 : _a.adapter) === null || _b === void 0 ? void 0 : _b.root;
900
+ },
901
+ enumerable: false,
902
+ configurable: true
903
+ });
904
+ Object.defineProperty(DisplayObject.prototype, "rotation", {
905
+ /**
906
+ * Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation.
907
+ * Values from 0 to 180 represent
908
+ * clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
909
+ * Values outside this range are added to or
910
+ * subtracted from 360 to obtain a value within the range. For example, the statement my_video.rotation = 450 is the
911
+ * same as my_video.rotation = 90.
912
+ */
913
+ get: function () {
914
+ return this.adaptee.rotationZ;
915
+ },
916
+ set: function (value) {
917
+ this._blockedByScript = true;
918
+ var rot = isNaN(value) ? 0 : isFinite(value) ? value % 360 : -8;
919
+ if (rot < -180) {
920
+ rot += 360;
921
+ }
922
+ else if (rot > 180) {
923
+ rot -= 360;
924
+ }
925
+ this.adaptee.rotationZ = rot;
926
+ },
927
+ enumerable: false,
928
+ configurable: true
929
+ });
930
+ Object.defineProperty(DisplayObject.prototype, "rotationX", {
931
+ /**
932
+ * Indicates the x-axis rotation of the DisplayObject instance,
933
+ * in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent
934
+ * clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
935
+ * Values outside this range are added to or
936
+ * subtracted from 360 to obtain a value within the range.
937
+ */
938
+ get: function () {
939
+ return this.adaptee.rotationX;
940
+ },
941
+ set: function (value) {
942
+ this._blockedByScript = true;
943
+ this.adaptee.rotationX = value;
944
+ },
945
+ enumerable: false,
946
+ configurable: true
947
+ });
948
+ Object.defineProperty(DisplayObject.prototype, "rotationY", {
949
+ /**
950
+ * Indicates the y-axis rotation of the DisplayObject instance, in degrees,
951
+ * from its original orientation relative to the 3D parent container. Values from 0 to 180 represent
952
+ * clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
953
+ * Values outside this range are added to or
954
+ * subtracted from 360 to obtain a value within the range.
955
+ * @langversion 3.0
956
+ * @playerversion Flash 10
957
+ * @playerversion AIR 1.5
958
+ * @playerversion Lite 4
959
+ */
960
+ get: function () {
961
+ return this.adaptee.rotationY;
962
+ },
963
+ set: function (value) {
964
+ this._blockedByScript = true;
965
+ this.adaptee.rotationY = value;
966
+ },
967
+ enumerable: false,
968
+ configurable: true
969
+ });
970
+ Object.defineProperty(DisplayObject.prototype, "rotationZ", {
971
+ /**
972
+ * Indicates the z-axis rotation of the DisplayObject instance,
973
+ * in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent
974
+ * clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
975
+ * Values outside this range are added to or
976
+ * subtracted from 360 to obtain a value within the range.
977
+ */
978
+ get: function () {
979
+ return this.adaptee.rotationZ;
980
+ },
981
+ set: function (value) {
982
+ this._blockedByScript = true;
983
+ this.adaptee.rotationZ = value;
984
+ },
985
+ enumerable: false,
986
+ configurable: true
987
+ });
988
+ Object.defineProperty(DisplayObject.prototype, "scale9Grid", {
989
+ /**
990
+ * The current scaling grid that is in effect. If set to null,
991
+ * the entire displayobject is scaled normally when any scale transformation is
992
+ * applied.
993
+ *
994
+ * When you define the scale9Grid property, the displayobject is divided into a
995
+ * grid with nine regions based on the scale9Grid rectangle, which defines the
996
+ * center region of the grid. The eight other regions of the grid are the following areas:
997
+ * The upper-left corner outside of the rectangleThe area above the rectangle
998
+ * The upper-right corner outside of the rectangleThe area to the left of the rectangle
999
+ * The area to the right of the rectangleThe lower-left corner outside of the rectangle
1000
+ * The area below the rectangleThe lower-right corner outside of the rectangle
1001
+ * You can think of the eight regions outside of the center (defined by the rectangle)
1002
+ * as being like a picture frame that has special rules applied to it when scaled.
1003
+ * When the scale9Grid property is set and a displayobject is scaled, all text and
1004
+ * gradients are scaled normally; however, for other types of anys the following rules apply:
1005
+ * Content in the center region is scaled normally. Content in the corners is not scaled.
1006
+ * Content in the top and bottom regions is scaled horizontally only. Content in the
1007
+ * left and right regions is scaled vertically only.All fills (including bitmaps, video, and gradients)
1008
+ * are stretched to fit their shapes.If a displayobject is rotated, all subsequent scaling is normal (and the
1009
+ * scale9Grid property is ignored).For example, consider the following displayobject and a rectangle
1010
+ * that is applied as the display
1011
+ * any's scale9Grid:The displayobject.The red rectangle shows the scale9Grid.
1012
+ * When the displayobject is scaled or stretched, the anys within the rectangle scale
1013
+ * normally, but the anys outside of the rectangle scale according to the
1014
+ * scale9Grid rules:
1015
+ * Scaled to 75%:Scaled to 50%:Scaled to 25%:Stretched horizontally
1016
+ * 150%: A common use for setting scale9Grid is to set up a displayobject to be used
1017
+ * as a component, in which edge regions retain the same width when the component is scaled.
1018
+ * @maelexample The following creates a movie clip that contains a 20-pixel line (which forms a border)
1019
+ * and a gradient fill. The movie clip scales based on the mouse position, and because of the
1020
+ * <code>scale9Grid</code> set for the movie clip, the thickness of the 20-pixel line does not
1021
+ * vary when the clip scales (although the gradient in the movie clip <em>does</em> scale):
1022
+ *
1023
+ * <listing version="2.0">
1024
+ * import Rectangle;
1025
+ * import flash.geom.Matrix;
1026
+ *
1027
+ * this.createEmptyMovieClip("my_mc", this.getNextHighestDepth());
1028
+ *
1029
+ * var grid:Rectangle = new Rectangle(20, 20, 260, 260);
1030
+ * my_mc.scale9Grid = grid ;
1031
+ *
1032
+ * my_mc._x = 50;
1033
+ * my_mc._y = 50;
1034
+ *
1035
+ * onMouseMove()
1036
+ * {
1037
+ * my_mc._width = _xmouse;
1038
+ * my_mc._height = _ymouse;
1039
+ * }
1040
+ *
1041
+ * my_mc.lineStyle(20, 0xff3333, 100);
1042
+ * var gradient_matrix:Matrix = new Matrix();
1043
+ * gradient_matrix.createGradientBox(15, 15, Math.PI, 10, 10);
1044
+ * my_mc.beginGradientFill("radial", [0xffff00, 0x0000ff],
1045
+ * [100, 100], [0, 0xFF], gradient_matrix,
1046
+ * "reflect", "RGB", 0.9);
1047
+ * my_mc.moveTo(0, 0);
1048
+ * my_mc.lineTo(0, 300);
1049
+ * my_mc.lineTo(300, 300);
1050
+ * my_mc.lineTo(300, 0);
1051
+ * my_mc.lineTo(0, 0);
1052
+ * my_mc.endFill();
1053
+ * </listing>
1054
+ * @console.logs ArgumentError If you pass an invalid argument to the method.
1055
+ */
1056
+ get: function () {
1057
+ return new this.sec.flash.geom.Rectangle(this.adaptee.scale9Grid);
1058
+ },
1059
+ set: function (innerRectangle) {
1060
+ this.adaptee.scale9Grid = innerRectangle.adaptee;
1061
+ },
1062
+ enumerable: false,
1063
+ configurable: true
1064
+ });
1065
+ Object.defineProperty(DisplayObject.prototype, "scaleX", {
1066
+ /**
1067
+ * Indicates the horizontal scale (percentage) of the any as applied from the registration point. The default
1068
+ * registration point is (0,0). 1.0 equals 100% scale.
1069
+ *
1070
+ * Scaling the local coordinate system changes the x and y property values, which are defined in
1071
+ * whole pixels.
1072
+ */
1073
+ get: function () {
1074
+ return this.adaptee.scaleX;
1075
+ },
1076
+ set: function (value) {
1077
+ this._blockedByScript = true;
1078
+ this.adaptee.scaleX = value;
1079
+ },
1080
+ enumerable: false,
1081
+ configurable: true
1082
+ });
1083
+ Object.defineProperty(DisplayObject.prototype, "scaleY", {
1084
+ /**
1085
+ * Indicates the vertical scale (percentage) of an any as applied from the registration point of the any. The
1086
+ * default registration point is (0,0). 1.0 is 100% scale.
1087
+ *
1088
+ * Scaling the local coordinate system changes the x and y property values, which are defined in
1089
+ * whole pixels.
1090
+ */
1091
+ get: function () {
1092
+ return this.adaptee.scaleY;
1093
+ },
1094
+ set: function (value) {
1095
+ this._blockedByScript = true;
1096
+ this.adaptee.scaleY = value;
1097
+ },
1098
+ enumerable: false,
1099
+ configurable: true
1100
+ });
1101
+ Object.defineProperty(DisplayObject.prototype, "scaleZ", {
1102
+ /**
1103
+ * Indicates the depth scale (percentage) of an any as applied from the registration point of the any. The
1104
+ * default registration point is (0,0). 1.0 is 100% scale.
1105
+ *
1106
+ * Scaling the local coordinate system changes the x, y and z property values, which are defined in
1107
+ * whole pixels.
1108
+ */
1109
+ get: function () {
1110
+ return this.adaptee.scaleZ;
1111
+ },
1112
+ set: function (value) {
1113
+ this._blockedByScript = true;
1114
+ this.adaptee.scaleZ = value;
1115
+ },
1116
+ enumerable: false,
1117
+ configurable: true
1118
+ });
1119
+ Object.defineProperty(DisplayObject.prototype, "scrollRect", {
1120
+ /**
1121
+ * The scroll rectangle bounds of the displayobject. The displayobject is cropped to the size
1122
+ * defined by the rectangle, and it scrolls within the rectangle when you change the
1123
+ * x and y properties of the scrollRect any.
1124
+ *
1125
+ * The properties of the scrollRect Rectangle any use the displayobject's coordinate space
1126
+ * and are scaled just like the overall displayobject. The corner bounds of the cropped window on the scrolling
1127
+ * displayobject are the origin of the displayobject (0,0) and the point defined by the
1128
+ * width and height of the rectangle. They are not centered around the origin, but
1129
+ * use the origin to define the upper-left corner of the area. A scrolled displayobject always
1130
+ * scrolls in whole pixel increments. You can scroll an any left and right by setting the x property of the
1131
+ * scrollRect Rectangle any. You can scroll an any up and down by setting
1132
+ * the y property of the scrollRect Rectangle any. If the displayobject
1133
+ * is rotated 90° and you scroll it left and right, the displayobject actually scrolls up and down.
1134
+ */
1135
+ get: function () {
1136
+ if (this.adaptee.scrollRect)
1137
+ return new this.sec.flash.geom.Rectangle(this.adaptee.scrollRect);
1138
+ return null;
1139
+ },
1140
+ set: function (value) {
1141
+ this.adaptee.scrollRect = value ? value.adaptee : null;
1142
+ },
1143
+ enumerable: false,
1144
+ configurable: true
1145
+ });
1146
+ Object.defineProperty(DisplayObject.prototype, "stage", {
1147
+ /**
1148
+ * The Stage of the displayobject. A Flash runtime application has only one Stage any.
1149
+ * For example, you can create and load multiple displayobjects into the display list, and the
1150
+ * stage property of each displayobject refers to the same Stage any (even if the
1151
+ * displayobject belongs to a loaded SWF file).
1152
+ *
1153
+ * If a displayobject is not added to the display list, its stage property is set to
1154
+ * null.
1155
+ */
1156
+ get: function () {
1157
+ var _a, _b;
1158
+ // nasty stuff:
1159
+ // overrite for "get stage" does not work when called from avm
1160
+ // if we call myStage.stage, it will still execute this function,
1161
+ // because abc code does not know there exists a "get stage" on stage.
1162
+ // also checking by "this instanceof Stage" does not work due to circular dependencies
1163
+ // "_isStage" is a workaround which should only ever return true if "this" is a Stage object
1164
+ return this._isStage ? this : (_b = (_a = this.adaptee.parent) === null || _a === void 0 ? void 0 : _a.adapter) === null || _b === void 0 ? void 0 : _b.stage;
1165
+ },
1166
+ enumerable: false,
1167
+ configurable: true
1168
+ });
1169
+ Object.defineProperty(DisplayObject.prototype, "transform", {
1170
+ /**
1171
+ * An any with properties pertaining to a displayobject's matrix, color transform, and pixel bounds.
1172
+ * The specific properties — matrix, colorTransform, and three read-only properties
1173
+ * (concatenatedMatrix, concatenatedColorTransform,
1174
+ * and pixelBounds) — are described in the entry for the Transform class.
1175
+ *
1176
+ * Each of the transform any's properties is itself an any. This concept is important because the only
1177
+ * way to set new values for the matrix or colorTransform anys is to create a new any and copy that
1178
+ * any into the transform.matrix or transform.colorTransform property.For example,
1179
+ * to increase the tx value of a displayobject's matrix, you must make a
1180
+ * copy of the entire matrix any, then copy the new any into the matrix property of the transform
1181
+ * any:
1182
+ * var myMatrix:Matrix = myDisplayObject.transform.matrix;
1183
+ * myMatrix.tx += 10;
1184
+ * myDisplayObject.transform.matrix = myMatrix;
1185
+ * You cannot directly set the tx property. The following code has
1186
+ * no effect on myDisplayObject:
1187
+ * myDisplayObject.transform.matrix.tx += 10;
1188
+ * You can also copy an entire transform any and assign it to another
1189
+ * displayobject's transform property. For example, the following code
1190
+ * copies the entire transform any from myOldDisplayObj to
1191
+ * myNewDisplayObj:myNewDisplayObj.transform = myOldDisplayObj.transform;
1192
+ * The resulting displayobject, myNewDisplayObj, now has the same values for its
1193
+ * matrix, color transform, and pixel bounds as the old displayobject, myOldDisplayObj.
1194
+ * Note that AIR for TV devices use hardware acceleration, if it is available, for color transforms.
1195
+ */
1196
+ get: function () {
1197
+ this._ctBlockedByScript = true;
1198
+ return this._transform
1199
+ || (this._transform = new this.sec.flash.geom.Transform(this.adaptee.transform));
1200
+ },
1201
+ set: function (value) {
1202
+ if (!value || !this.adaptee)
1203
+ return;
1204
+ this._ctBlockedByScript = true;
1205
+ var src = value.adaptee;
1206
+ var dst = this.adaptee.transform;
1207
+ if (!src || !dst)
1208
+ return;
1209
+ // Flash copies matrix + colorTransform values, it does not share the Transform.
1210
+ var m = src.matrix;
1211
+ var ct = src.colorTransform;
1212
+ dst.matrix = (m && typeof m.clone === 'function') ? m.clone() : m;
1213
+ dst.colorTransform = (ct && typeof ct.clone === 'function') ? ct.clone() : ct;
1214
+ },
1215
+ enumerable: false,
1216
+ configurable: true
1217
+ });
1218
+ Object.defineProperty(DisplayObject.prototype, "visible", {
1219
+ /**
1220
+ * Whether or not the displayobject is visible. displayobjects that are not visible
1221
+ * are disabled. For example, if visible=false for an Interactiveany instance,
1222
+ * it cannot be clicked.
1223
+ */
1224
+ get: function () {
1225
+ return this._adaptee.visible;
1226
+ },
1227
+ set: function (value) {
1228
+ this._visibilityByScript = true;
1229
+ this._adaptee.visible = value;
1230
+ },
1231
+ enumerable: false,
1232
+ configurable: true
1233
+ });
1234
+ Object.defineProperty(DisplayObject.prototype, "width", {
1235
+ /**
1236
+ * Indicates the width of the displayobject, in pixels.
1237
+ * The width is calculated based on the bounds of the content of the displayobject.
1238
+ * When you set the width property, the scaleX property is adjusted accordingly, as shown in the
1239
+ * following code:
1240
+ *
1241
+ * <codeblock>
1242
+ *
1243
+ * var rect:Shape = new Shape();
1244
+ * rect.graphics.beginFill(0xFF0000);
1245
+ * rect.graphics.drawRect(0, 0, 100, 100);
1246
+ * trace(rect.scaleX) // 1;
1247
+ * rect.width = 200;
1248
+ * trace(rect.scaleX) // 2;
1249
+ * </codeblock>
1250
+ * Except for TextField and Video anys, a displayobject with no content (such as an empty sprite) has a width
1251
+ * of 0, even if you try to set width to a different value.
1252
+ */
1253
+ get: function () {
1254
+ if (this._forceWidth != 0)
1255
+ return this._forceWidth;
1256
+ if (this.adaptee.isAsset(TextField)) {
1257
+ return this.adaptee.width;
1258
+ }
1259
+ var box = this.getBoundsInternal(this.parent || this._stage);
1260
+ return (box == null) ? 0 : Math.round(box.width * 20) / 20;
1261
+ },
1262
+ set: function (value) {
1263
+ //todo2019
1264
+ if (isNaN(value))
1265
+ return;
1266
+ value = clampASValues(value);
1267
+ // round to twips
1268
+ value = Math.round(value * 20) / 20;
1269
+ this._blockedByScript = true;
1270
+ // this should be done by overwriting the width-getter in TextField- but it doesnt work
1271
+ if (this.adaptee.isAsset(TextField)) {
1272
+ this.adaptee.width = value;
1273
+ return;
1274
+ }
1275
+ PickGroup.getInstance().getBoundsPicker(this.node).width = value;
1276
+ },
1277
+ enumerable: false,
1278
+ configurable: true
1279
+ });
1280
+ Object.defineProperty(DisplayObject.prototype, "x", {
1281
+ /**
1282
+ * Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of
1283
+ * the parent DisplayObjectContainer. If the any is inside a DisplayObjectContainer that has
1284
+ * transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer.
1285
+ * Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's
1286
+ * children inherit a coordinate system that is rotated 90° counterclockwise.
1287
+ * The any's coordinates refer to the registration point position.
1288
+ */
1289
+ get: function () {
1290
+ // return raw value to avoid prototype jumping and method execution
1291
+ // for Textfields we must respect the scaled TextOffsetX property:
1292
+ if (this._adaptee.textOffsetX)
1293
+ return this._adaptee._transform._matrix3D._rawData[12]
1294
+ + (this._adaptee.textOffsetX * (this.adaptee.scaleX));
1295
+ return this._adaptee._transform._matrix3D._rawData[12];
1296
+ },
1297
+ set: function (value) {
1298
+ value = clampASValues(value);
1299
+ if (DisplayObject.defineLazy(this, 'x', value))
1300
+ return;
1301
+ this._blockedByScript = true;
1302
+ // for Textfields we must respect the scaled TextOffsetX property:
1303
+ if (this._adaptee.textOffsetX)
1304
+ value -= (this._adaptee.textOffsetX * (this.adaptee.scaleX));
1305
+ this._adaptee.x = value;
1306
+ },
1307
+ enumerable: false,
1308
+ configurable: true
1309
+ });
1310
+ Object.defineProperty(DisplayObject.prototype, "y", {
1311
+ /**
1312
+ * Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of
1313
+ * the parent DisplayObjectContainer. If the any is inside a DisplayObjectContainer that has
1314
+ * transformations, it is in the local coordinate system of the enclosing DisplayObjectContainer.
1315
+ * Thus, for a DisplayObjectContainer rotated 90° counterclockwise, the DisplayObjectContainer's
1316
+ * children inherit a coordinate system that is rotated 90° counterclockwise.
1317
+ * The any's coordinates refer to the registration point position.
1318
+ */
1319
+ get: function () {
1320
+ // return raw value to avoid prototype jumping and method execution
1321
+ // for Textfields we must respect the scaled TextOffsetY property:
1322
+ if (this._adaptee.textOffsetY)
1323
+ return this._adaptee._transform._matrix3D._rawData[13]
1324
+ + (this._adaptee.textOffsetY * (this.adaptee.scaleY));
1325
+ return this._adaptee._transform._matrix3D._rawData[13];
1326
+ },
1327
+ set: function (value) {
1328
+ value = clampASValues(value);
1329
+ if (DisplayObject.defineLazy(this, 'y', value))
1330
+ return;
1331
+ this._blockedByScript = true;
1332
+ // for Textfields we must respect the scaled TextOffsetY property:
1333
+ if (this._adaptee.textOffsetY)
1334
+ value -= (this._adaptee.textOffsetY * (this.adaptee.scaleY));
1335
+ this._adaptee.y = value;
1336
+ },
1337
+ enumerable: false,
1338
+ configurable: true
1339
+ });
1340
+ Object.defineProperty(DisplayObject.prototype, "z", {
1341
+ /**
1342
+ * Indicates the z coordinate position along the z-axis of the DisplayObject
1343
+ * instance relative to the 3D parent container. The z property is used for
1344
+ * 3D coordinates, not screen or pixel coordinates.
1345
+ * When you set a z property for a displayobject to something other than the default
1346
+ * value of 0, a corresponding Matrix3D any is automatically created. for adjusting a
1347
+ * displayobject's position and orientation
1348
+ * in three dimensions. When working with the z-axis,
1349
+ * the existing behavior of x and y properties changes from screen or pixel coordinates to
1350
+ * positions relative to the 3D parent container.For example,
1351
+ * a child of the _root at position x = 100, y = 100, z = 200
1352
+ * is not drawn at pixel location (100,100). The child is drawn wherever the 3D projection
1353
+ * calculation puts it. The calculation is:
1354
+ * (x~~cameraFocalLength/cameraRelativeZPosition, y~~cameraFocalLength/cameraRelativeZPosition)
1355
+ */
1356
+ get: function () {
1357
+ // return raw value to avoid prototype jumping and method execution
1358
+ return this._adaptee._transform._matrix3D._rawData[14];
1359
+ },
1360
+ set: function (value) {
1361
+ value = clampASValues(value);
1362
+ this._blockedByScript = true;
1363
+ this._adaptee.z = value;
1364
+ },
1365
+ enumerable: false,
1366
+ configurable: true
1367
+ });
1368
+ /**
1369
+ * Returns a rectangle that defines the area of the displayobject relative to the coordinate system
1370
+ * of the targetCoordinateSpace any.
1371
+ * Consider the following code, which shows how the rectangle returned can vary depending on the
1372
+ * targetCoordinateSpace parameter that you pass to the method:
1373
+ *
1374
+ * <codeblock>
1375
+ *
1376
+ * var container:Sprite = new Sprite();
1377
+ * container.x = 100;
1378
+ * container.y = 100;
1379
+ * this.addChild(container);
1380
+ * var contents:Shape = new Shape();
1381
+ * contents.graphics.drawCircle(0,0,100);
1382
+ * container.addChild(contents);
1383
+ * trace(contents.getBounds(container));
1384
+ * // (x=-100, y=-100, w=200, h=200)
1385
+ * trace(contents.getBounds(this));
1386
+ * // (x=0, y=0, w=200, h=200)
1387
+ *
1388
+ * </codeblock>
1389
+ * Note: Use the localToGlobal() and
1390
+ * globalToLocal() methods to convert the displayobject's local coordinates
1391
+ * to display coordinates, or display coordinates to local coordinates,
1392
+ * respectively.The getBounds() method is similar to the getRect() method;
1393
+ * however, the Rectangle returned by the getBounds() method includes any strokes
1394
+ * on shapes, whereas the Rectangle returned by the getRect() method does not.
1395
+ * For an example, see the description of the getRect() method.
1396
+ * @param targetCoordinateSpace The displayobject that defines the coordinate system to use.
1397
+ * @return The rectangle that defines the area of the displayobject relative to
1398
+ * the targetCoordinateSpace any's coordinate system.
1399
+ */
1400
+ DisplayObject.prototype.getBounds = function (targetCoordinateSpace) {
1401
+ var box = this.getBoundsInternal(targetCoordinateSpace, true);
1402
+ var Rectangle = this.sec.flash.geom.Rectangle;
1403
+ // FLASH return strange bounds for cases when object is not has real bounds
1404
+ if (!box)
1405
+ return new Rectangle(6710886.4, 6710886.4, 0, 0);
1406
+ return new Rectangle(box.x, box.y, box.width, box.height);
1407
+ };
1408
+ /**
1409
+ * Internal method that return Box instance of bounds of DisplayObject
1410
+ */
1411
+ DisplayObject.prototype.getBoundsInternal = function (targetCoordinateSpace, strokeFlag) {
1412
+ if (targetCoordinateSpace === void 0) { targetCoordinateSpace = null; }
1413
+ if (strokeFlag === void 0) { strokeFlag = false; }
1414
+ if (!targetCoordinateSpace)
1415
+ targetCoordinateSpace = this;
1416
+ return PickGroup.getInstance().getBoundsPicker(this.node)
1417
+ .getBoxBounds(AVMStage.instance().view.getNode(targetCoordinateSpace.adaptee), strokeFlag, true);
1418
+ };
1419
+ /**
1420
+ * Returns a rectangle that defines the boundary of the displayobject,
1421
+ * based on the coordinate system defined by the targetCoordinateSpace
1422
+ * parameter, excluding any strokes on shapes. The values that the getRect() method
1423
+ * returns are the same or smaller than those returned by the getBounds() method.
1424
+ *
1425
+ * Note: Use localToGlobal() and globalToLocal() methods
1426
+ * to convert the displayobject's local coordinates to Stage coordinates, or Stage coordinates to
1427
+ * local coordinates, respectively.
1428
+ * @param targetCoordinateSpace The displayobject that defines the coordinate system to use.
1429
+ * @return The rectangle that defines the area of the displayobject relative to
1430
+ * the targetCoordinateSpace any's coordinate system.
1431
+ */
1432
+ DisplayObject.prototype.getRect = function (targetCoordinateSpace) {
1433
+ var box = this.getBoundsInternal(targetCoordinateSpace);
1434
+ var Rectangle = this.sec.flash.geom.Rectangle;
1435
+ if (!box)
1436
+ return new Rectangle();
1437
+ return new Rectangle(box.x, box.y, box.width, box.height);
1438
+ };
1439
+ /**
1440
+ * Converts the point any from the Stage (global) coordinates
1441
+ * to the displayobject's (local) coordinates.
1442
+ *
1443
+ * To use this method, first create an instance of the Point class. The
1444
+ * x and y values that you assign represent global coordinates because they
1445
+ * relate to the origin (0,0) of the main display area. Then pass the Point instance
1446
+ * as the parameter to the globalToLocal() method. The method returns a new Point any with
1447
+ * x and y values that relate to the origin of the displayobject
1448
+ * instead of the origin of the Stage.
1449
+ * @param point An any created with the Point class. The Point any
1450
+ * specifies the x and y coordinates as properties.
1451
+ * @return A Point any with coordinates relative to the displayobject.
1452
+ */
1453
+ DisplayObject.prototype.globalToLocal = function (point) {
1454
+ return new this.sec.flash.geom.Point(this.node.globalToLocal(point.adaptee));
1455
+ };
1456
+ /**
1457
+ * Converts a two-dimensional point from the Stage (global) coordinates to a
1458
+ * three-dimensional displayobject's (local) coordinates.
1459
+ *
1460
+ * To use this method, first create an instance of the Point class.
1461
+ * The x and y values that you assign to the Point any represent global
1462
+ * coordinates because they are relative to the origin (0,0) of the main display area.
1463
+ * Then pass the Point any to the globalToLocal3D()
1464
+ * method as the point parameter. The method returns three-dimensional
1465
+ * coordinates as a Vector3D any containing x, y, and
1466
+ * z values that are relative to the origin
1467
+ * of the three-dimensional displayobject.
1468
+ * @param point A two dimensional Point any representing global x and y coordinates.
1469
+ * @return A Vector3D any with coordinates relative to the three-dimensional
1470
+ * displayobject.
1471
+ */
1472
+ DisplayObject.prototype.globalToLocal3D = function (point) {
1473
+ // @todo
1474
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'globalToLocal3D', '');
1475
+ return new this.sec.flash.geom.Vector3D();
1476
+ };
1477
+ /**
1478
+ * Evaluates the bounding box of the displayobject to see if it overlaps or intersects with the
1479
+ * bounding box of the obj displayobject.
1480
+ * @param obj The displayobject to test against.
1481
+ * @return true if the bounding boxes of the displayobjects intersect; false if not.
1482
+ */
1483
+ DisplayObject.prototype.hitTestObject = function (obj) {
1484
+ return PickGroup.getInstance()
1485
+ .getBoundsPicker(this.node)
1486
+ .hitTestObject(PickGroup.getInstance().getBoundsPicker(obj.node));
1487
+ };
1488
+ /**
1489
+ * Evaluates the displayobject to see if it overlaps or intersects with the
1490
+ * point specified by the x and y parameters.
1491
+ * The x and y parameters specify a point in the
1492
+ * coordinate space of the Stage, not the displayobject container that contains the
1493
+ * displayobject (unless that displayobject container is the Stage).
1494
+ * @param x The x coordinate to test against this any.
1495
+ * @param y The y coordinate to test against this any.
1496
+ * @param shapeFlag Whether to check against the actual pixels of the any (true)
1497
+ * or the bounding box (false).
1498
+ * @return true if the displayobject overlaps or intersects with the specified point;
1499
+ * false otherwise.
1500
+ */
1501
+ DisplayObject.prototype.hitTestPoint = function (x, y, shapeFlag) {
1502
+ if (shapeFlag === void 0) { shapeFlag = false; }
1503
+ return PickGroup.getInstance()
1504
+ .getBoundsPicker(this.node)
1505
+ .hitTestPoint(x, y, shapeFlag);
1506
+ };
1507
+ /**
1508
+ * Converts a three-dimensional point of the three-dimensional display
1509
+ * any's (local) coordinates to a two-dimensional point in the Stage (global) coordinates.
1510
+ *
1511
+ * For example, you can only use two-dimensional coordinates (x,y) to
1512
+ * draw with the display.Graphics methods. To draw a three-dimensional
1513
+ * any, you need to map the three-dimensional coordinates of a
1514
+ * displayobject to two-dimensional coordinates. First, create an instance of
1515
+ * the Vector3D class that holds the x-, y-, and z- coordinates of the three-dimensional
1516
+ * displayobject. Then pass the Vector3D any to the local3DToGlobal()
1517
+ * method as the point3d parameter. The method returns a two-dimensional Point
1518
+ * any that can be used
1519
+ * with the Graphics API to draw the three-dimensional any.
1520
+ * @param point3d A Vector3D any containing either a three-dimensional point or
1521
+ * the coordinates of the three-dimensional displayobject.
1522
+ * @return A two-dimensional point representing a three-dimensional point
1523
+ * in two-dimensional space.
1524
+ */
1525
+ DisplayObject.prototype.local3DToGlobal = function (point3d) {
1526
+ // @todo
1527
+ Debug.throwPIR('playerglobals/display/DisplayObject', 'local3DToGlobal', '');
1528
+ return new this.sec.flash.geom.Point(); //this._adaptee.getBounds();
1529
+ };
1530
+ /**
1531
+ * Converts the point any from the displayobject's (local) coordinates to the
1532
+ * Stage (global) coordinates.
1533
+ *
1534
+ * This method allows you to convert any given x and y coordinates from
1535
+ * values that are relative to the origin (0,0) of a specific displayobject (local coordinates)
1536
+ * to values that are relative to the origin of the Stage (global coordinates).
1537
+ * To use this method, first create an instance of the Point class. The
1538
+ * x and y values that you assign represent local coordinates because they
1539
+ * relate to the origin of the displayobject.You then pass the Point instance that you created as the parameter to
1540
+ * the localToGlobal() method. The method returns a new Point any with
1541
+ * x and y values that relate to the origin of the Stage
1542
+ * instead of the origin of the displayobject.
1543
+ * @param point The name or identifier of a point created with the Point class, specifying the
1544
+ * x and y coordinates as properties.
1545
+ * @return A Point any with coordinates relative to the Stage.
1546
+ */
1547
+ DisplayObject.prototype.localToGlobal = function (point) {
1548
+ return new this.sec.flash.geom.Point(this.node.localToGlobal(point.adaptee));
1549
+ };
1550
+ DisplayObject._activeStage = null;
1551
+ return DisplayObject;
1552
+ }(EventDispatcher));
1553
+ export { DisplayObject };