mako 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (391) hide show
  1. data/bin/mako +133 -0
  2. data/lib/mako/build.rb +336 -0
  3. data/lib/mako/data/flash_widget_dev_core/Dependencies.txt +10 -0
  4. data/lib/mako/data/flash_widget_dev_core/libs/Degrafa_.2.11.swc +0 -0
  5. data/lib/mako/data/flash_widget_dev_core/libs/KogneatoGraphics.swc +0 -0
  6. data/lib/mako/data/flash_widget_dev_core/libs/KogneatoSymbols.swc +0 -0
  7. data/lib/mako/data/flash_widget_dev_core/libs/flash.swc +0 -0
  8. data/lib/mako/data/flash_widget_dev_core/src/assets/images/RichTextEditor.png +0 -0
  9. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/ARLRDBD.TTF +0 -0
  10. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/FTD_____.TTF +0 -0
  11. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdana.ttf +0 -0
  12. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanab.ttf +0 -0
  13. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanai.ttf +0 -0
  14. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanaz.ttf +0 -0
  15. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/DefaultError.png +0 -0
  16. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/barbgfill.png +0 -0
  17. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/barshadow.png +0 -0
  18. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/bold.png +0 -0
  19. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/bullets.png +0 -0
  20. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/center.png +0 -0
  21. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/close-x.png +0 -0
  22. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/fullscreenPopup_close.png +0 -0
  23. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc.png +0 -0
  24. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc2.png +0 -0
  25. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc3.png +0 -0
  26. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/qa.png +0 -0
  27. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/so.png +0 -0
  28. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/importIcon.png +0 -0
  29. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/italic.png +0 -0
  30. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/justify.png +0 -0
  31. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/kogLogo.png +0 -0
  32. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/left.png +0 -0
  33. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-href-disabled.png +0 -0
  34. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-href.png +0 -0
  35. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-pagelink-disabled.png +0 -0
  36. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-pagelink.png +0 -0
  37. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-delete.png +0 -0
  38. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-disabled.png +0 -0
  39. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-edit.png +0 -0
  40. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip.png +0 -0
  41. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/pencil.png +0 -0
  42. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/right.png +0 -0
  43. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/underline.png +0 -0
  44. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayButton.png +0 -0
  45. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPauseButton.png +0 -0
  46. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPauseButton_over.png +0 -0
  47. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPlayButton.png +0 -0
  48. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPlayButton_over.png +0 -0
  49. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerSoundButton.png +0 -0
  50. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerSoundButton_over.png +0 -0
  51. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/styles/creatorStyle.css +57 -0
  52. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/styles/style.css +929 -0
  53. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/embeddedfonts.swf +0 -0
  54. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/helpBubble.swf +0 -0
  55. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/kogneatoSymbols.swf +0 -0
  56. data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/videobg.swf +0 -0
  57. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/LICENSE.txt +27 -0
  58. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/CubeRotate.as +48 -0
  59. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Distortion.as +168 -0
  60. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/DistortionConstants.as +16 -0
  61. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Door.as +57 -0
  62. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Flip.as +62 -0
  63. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Gate.as +57 -0
  64. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Pop.as +53 -0
  65. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Push.as +48 -0
  66. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/SimpleDistortion.as +619 -0
  67. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/CubeRotateInstance.as +94 -0
  68. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/DistortBaseInstance.as +258 -0
  69. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/DoorInstance.as +116 -0
  70. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/FlipInstance.as +79 -0
  71. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/GateInstance.as +163 -0
  72. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/PopInstance.as +91 -0
  73. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/PushInstance.as +76 -0
  74. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/DisplayObjectBounds.as +64 -0
  75. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/DisplayObjectBoundsUtil.as +42 -0
  76. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/SimpleDisplayObjectBoundsUtil.as +60 -0
  77. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/HMAC.as +108 -0
  78. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/MD5.as +250 -0
  79. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/MD5Stream.as +343 -0
  80. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA1.as +250 -0
  81. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA224.as +226 -0
  82. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA256.as +229 -0
  83. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/WSSEUsernameToken.as +100 -0
  84. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFade.as +107 -0
  85. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFadeInstance.as +178 -0
  86. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFadePopUpBlocker.as +88 -0
  87. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/errors/IllegalStateError.as +57 -0
  88. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Address.as +41 -0
  89. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Email.as +34 -0
  90. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Phone.as +34 -0
  91. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/VCard.as +47 -0
  92. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/VCardParser.as +234 -0
  93. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/BitString.as +34 -0
  94. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/JPGEncoder.as +584 -0
  95. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/PNGEncoder.as +133 -0
  96. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/DynamicURLLoader.as +48 -0
  97. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/IURIResolver.as +70 -0
  98. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/MimeTypeMap.as +192 -0
  99. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/URI.as +2139 -0
  100. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/URIEncodingBitmap.as +122 -0
  101. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/proxies/RFC2817Socket.as +179 -0
  102. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Database.as +55 -0
  103. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Definition.as +59 -0
  104. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Dict.as +322 -0
  105. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/DictionaryServer.as +50 -0
  106. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/MatchStrategy.as +55 -0
  107. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Response.as +59 -0
  108. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/ConnectedEvent.as +44 -0
  109. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DatabaseEvent.as +54 -0
  110. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DefinitionEvent.as +55 -0
  111. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as +55 -0
  112. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DictionaryServerEvent.as +55 -0
  113. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DisconnectedEvent.as +44 -0
  114. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/ErrorEvent.as +64 -0
  115. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/MatchEvent.as +54 -0
  116. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/MatchStrategiesEvent.as +56 -0
  117. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/NoMatchEvent.as +44 -0
  118. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/util/CompleteResponseEvent.as +55 -0
  119. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/util/SocketHelper.as +70 -0
  120. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSON.as +76 -0
  121. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONDecoder.as +303 -0
  122. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONEncoder.as +277 -0
  123. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONParseError.as +79 -0
  124. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONToken.as +79 -0
  125. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONTokenType.as +49 -0
  126. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONTokenizer.as +605 -0
  127. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/ArrayUtil.as +166 -0
  128. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/DateUtil.as +657 -0
  129. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/DictionaryUtil.as +73 -0
  130. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/IntUtil.as +85 -0
  131. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/NumberFormatter.as +63 -0
  132. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/StringUtil.as +220 -0
  133. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/XMLUtil.as +148 -0
  134. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/ServiceBase.as +39 -0
  135. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/URLLoaderBase.as +93 -0
  136. data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/events/ServiceEvent.as +67 -0
  137. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/geom/ColorMatrix.as +1 -0
  138. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTween.as +1 -0
  139. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTweenTimeline.as +1 -0
  140. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTweener.as +1 -0
  141. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Back.as +1 -0
  142. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Bounce.as +1 -0
  143. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Circular.as +1 -0
  144. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Cubic.as +1 -0
  145. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Elastic.as +1 -0
  146. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Exponential.as +1 -0
  147. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Linear.as +1 -0
  148. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quadratic.as +1 -0
  149. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quartic.as +1 -0
  150. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quintic.as +1 -0
  151. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Sine.as +1 -0
  152. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/AutoHidePlugin.as +1 -0
  153. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/BlurPlugin.as +1 -0
  154. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/ColorAdjustPlugin.as +1 -0
  155. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/ColorTransformPlugin.as +1 -0
  156. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/CurrentFramePlugin.as +1 -0
  157. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/IGTweenPlugin.as +1 -0
  158. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/MatrixPlugin.as +1 -0
  159. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/MotionBlurPlugin.as +1 -0
  160. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SmartRotationPlugin.as +1 -0
  161. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SnappingPlugin.as +1 -0
  162. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SoundTransformPlugin.as +1 -0
  163. data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/utils/SWFBridgeAS3.as +83 -0
  164. data/lib/mako/data/flash_widget_dev_core/src/etc/GUID.as +82 -0
  165. data/lib/mako/data/flash_widget_dev_core/src/etc/MathExt.as +114 -0
  166. data/lib/mako/data/flash_widget_dev_core/src/gs/OverwriteManager.as +143 -0
  167. data/lib/mako/data/flash_widget_dev_core/src/gs/TweenFilterLite.as +502 -0
  168. data/lib/mako/data/flash_widget_dev_core/src/gs/TweenLite.as +512 -0
  169. data/lib/mako/data/flash_widget_dev_core/src/gs/TweenMax.as +987 -0
  170. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Back.as +14 -0
  171. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Bounce.as +22 -0
  172. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Circ.as +14 -0
  173. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Cubic.as +14 -0
  174. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Elastic.as +27 -0
  175. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Expo.as +16 -0
  176. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Linear.as +16 -0
  177. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quad.as +14 -0
  178. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quart.as +14 -0
  179. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quint.as +14 -0
  180. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Sine.as +14 -0
  181. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Strong.as +14 -0
  182. data/lib/mako/data/flash_widget_dev_core/src/gs/easing/easing_readme.txt +14 -0
  183. data/lib/mako/data/flash_widget_dev_core/src/gs/events/TweenEvent.as +26 -0
  184. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/BevelFilterVars.as +63 -0
  185. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/BlurFilterVars.as +42 -0
  186. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/ColorMatrixFilterVars.as +86 -0
  187. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/DropShadowFilterVars.as +66 -0
  188. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/GlowFilterVars.as +57 -0
  189. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenFilterLiteVars.as +93 -0
  190. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenLiteVars.as +269 -0
  191. data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenMaxVars.as +103 -0
  192. data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenEvent.as +17 -0
  193. data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenObject.as +27 -0
  194. data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenSingleton.as +86 -0
  195. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/Constant.as +7 -0
  196. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/FastSlow.as +7 -0
  197. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/FastSlowFast.as +8 -0
  198. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/Shake.as +12 -0
  199. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/SlowFast.as +7 -0
  200. data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/SlowFastSlow.as +8 -0
  201. data/lib/mako/data/flash_widget_dev_core/src/jac/image/ImageUtils.as +173 -0
  202. data/lib/mako/data/flash_widget_dev_core/src/jac/image/ResizeStyle.as +52 -0
  203. data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorBase.mxml +504 -0
  204. data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorConfig.as +45 -0
  205. data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorEvents.as +38 -0
  206. data/lib/mako/data/flash_widget_dev_core/src/materia/Dialog.as +35 -0
  207. data/lib/mako/data/flash_widget_dev_core/src/materia/MateriaButton.as +35 -0
  208. data/lib/mako/data/flash_widget_dev_core/src/materia/PopUpAlert.mxml +271 -0
  209. data/lib/mako/data/flash_widget_dev_core/src/materia/components/GradientBackground.as +41 -0
  210. data/lib/mako/data/flash_widget_dev_core/src/materia/components/PercentField.mxml +104 -0
  211. data/lib/mako/data/flash_widget_dev_core/src/materia/components/ScrollableSizableImage.mxml +654 -0
  212. data/lib/mako/data/flash_widget_dev_core/src/materia/components/TextAreaWithDefaultText.mxml +94 -0
  213. data/lib/mako/data/flash_widget_dev_core/src/materia/components/TextInputWithDefaultText.mxml +94 -0
  214. data/lib/mako/data/flash_widget_dev_core/src/materia/components/VertCenterTextRenderer.mxml +37 -0
  215. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/ImportEvent.as +22 -0
  216. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/itemRenderers/CheckBoxColumn.mxml +23 -0
  217. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionDetails.mxml +68 -0
  218. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionDisplay.mxml +38 -0
  219. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionsDataGrid.mxml +247 -0
  220. data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionsDataGridEvent.as +20 -0
  221. data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/QuestionAnswerColumn.as +13 -0
  222. data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/QuestionAnswerDataGrid.mxml +692 -0
  223. data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/TextInputItem.mxml +584 -0
  224. data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/TextInputObject.as +28 -0
  225. data/lib/mako/data/flash_widget_dev_core/src/materia/components/toolTips/KogneatoToolTip.as +196 -0
  226. data/lib/mako/data/flash_widget_dev_core/src/materia/components/toolTips/TipManager.as +150 -0
  227. data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpBubble.mxml +245 -0
  228. data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpDot.mxml +21 -0
  229. data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpManager.as +92 -0
  230. data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpObject.as +33 -0
  231. data/lib/mako/data/flash_widget_dev_core/src/materia/help/IHelpGuided.as +7 -0
  232. data/lib/mako/data/flash_widget_dev_core/src/materia/media/ImageCacherImage.mxml +56 -0
  233. data/lib/mako/data/flash_widget_dev_core/src/materia/media/MateriaUploader.as +61 -0
  234. data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/Question.as +386 -0
  235. data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/QuestionGroup.as +313 -0
  236. data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/QuestionSet.as +21 -0
  237. data/lib/mako/data/flash_widget_dev_core/src/materia/toolTips/KogneatoToolTip.as +196 -0
  238. data/lib/mako/data/flash_widget_dev_core/src/materia/toolTips/TipManager.as +150 -0
  239. data/lib/mako/data/flash_widget_dev_core/src/materia/utils/CommonUtils.as +186 -0
  240. data/lib/mako/data/flash_widget_dev_core/src/materia/utils/DateUtils.as +273 -0
  241. data/lib/mako/data/flash_widget_dev_core/src/materia/utils/ImageCacher.as +93 -0
  242. data/lib/mako/data/flash_widget_dev_core/src/nm/arrays/Randomize.as +19 -0
  243. data/lib/mako/data/flash_widget_dev_core/src/nm/arrays/SimpleClone.as +32 -0
  244. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/Color.as +102 -0
  245. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/Draw.as +65 -0
  246. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/lines/Dashed.as +48 -0
  247. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/lines/Dotted.as +83 -0
  248. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/Check.as +27 -0
  249. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/Rect.as +12 -0
  250. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectBevel.as +35 -0
  251. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectBorder.as +39 -0
  252. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectRound.as +33 -0
  253. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectRoundBorder.as +62 -0
  254. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/TriangleEquilateral.as +25 -0
  255. data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/X.as +28 -0
  256. data/lib/mako/data/flash_widget_dev_core/src/nm/errors/ScoringError.as +10 -0
  257. data/lib/mako/data/flash_widget_dev_core/src/nm/errors/StorageError.as +10 -0
  258. data/lib/mako/data/flash_widget_dev_core/src/nm/events/ButtonEvent.as +25 -0
  259. data/lib/mako/data/flash_widget_dev_core/src/nm/events/PayloadEvent.as +14 -0
  260. data/lib/mako/data/flash_widget_dev_core/src/nm/events/StandardEvent.as +26 -0
  261. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/Question.as +72 -0
  262. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/QuestionGroup.as +87 -0
  263. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/QuestionSet.as +35 -0
  264. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/WidgetSettings.as +14 -0
  265. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/coms/ServerEvents.as +17 -0
  266. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/coms/ServerMessageEvent.as +31 -0
  267. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/logging/Log.as +92 -0
  268. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/scoring/Scoring.as +87 -0
  269. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/storage/StorageManager.as +91 -0
  270. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/storage/StorageTable.as +72 -0
  271. data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/engines/EngineCore.as +222 -0
  272. data/lib/mako/data/flash_widget_dev_core/src/nm/geom/Dimension.as +76 -0
  273. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/Respondus.as +612 -0
  274. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusAnswer.as +11 -0
  275. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusError.as +18 -0
  276. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusQuestion.as +43 -0
  277. data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusQuiz.as +68 -0
  278. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/AlertWindow.as +182 -0
  279. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/BlueButton.as +102 -0
  280. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Button.as +88 -0
  281. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Button_base.as +168 -0
  282. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Component.as +98 -0
  283. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ContentBlocker.as +38 -0
  284. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/FlexUIScaler.as +59 -0
  285. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/FormInput.as +191 -0
  286. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/GrabZoomClip.as +305 -0
  287. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/HelpLayer.as +55 -0
  288. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Label.as +25 -0
  289. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/List.as +62 -0
  290. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/List_Base.as +644 -0
  291. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProcessingBar.as +112 -0
  292. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProgressBar.as +35 -0
  293. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProgressBar_base.as +69 -0
  294. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollBar.as +163 -0
  295. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollBar_base.as +378 -0
  296. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollClip.as +468 -0
  297. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollText.as +29 -0
  298. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollText_base.as +295 -0
  299. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/SimpleScrollBar.as +247 -0
  300. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StageRef.as +34 -0
  301. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StorageTank.as +233 -0
  302. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StorageTankHorizontal.as +109 -0
  303. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ToolTip.as +930 -0
  304. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/TweeningDragDropBankList.as +503 -0
  305. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Window.as +144 -0
  306. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Window_base.as +385 -0
  307. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/CenterScale.as +27 -0
  308. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/WindowManager.as +163 -0
  309. data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/WindowStage.as +96 -0
  310. data/lib/mako/data/flash_widget_dev_core/src/nm/util/BitField.as +99 -0
  311. data/lib/mako/data/flash_widget_dev_core/src/nm/util/ObjPeek.as +148 -0
  312. data/lib/mako/data/flash_widget_dev_core/src/nm/util/Objects.as +49 -0
  313. data/lib/mako/data/flash_widget_dev_core/src/nm/util/Printer.as +548 -0
  314. data/lib/mako/data/flash_widget_dev_core/src/nm/util/StringUtil.as +12 -0
  315. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/FaultEvent.as +37 -0
  316. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingCall.as +211 -0
  317. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingConnection.as +41 -0
  318. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingService.as +214 -0
  319. data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/ResultEvent.as +36 -0
  320. data/lib/mako/data/flash_widget_dev_core/src/sandy/util/DistortImage.as +281 -0
  321. data/lib/mako/data/flash_widget_dev_core/src/sandy/util/SandyPoint.as +29 -0
  322. data/lib/mako/data/flash_widget_dev_core/src/sandy/util/Triangle.as +32 -0
  323. data/lib/mako/data/html/thistest.html +0 -0
  324. data/lib/mako/data/template_creator/src/Creator.mxml +138 -0
  325. data/lib/mako/data/template_creator/src/assets/images/RichTextEditor.png +0 -0
  326. data/lib/mako/data/template_creator/src/assets/materia/images/DefaultError.png +0 -0
  327. data/lib/mako/data/template_creator/src/assets/materia/images/barbgfill.png +0 -0
  328. data/lib/mako/data/template_creator/src/assets/materia/images/barshadow.png +0 -0
  329. data/lib/mako/data/template_creator/src/assets/materia/images/bold.png +0 -0
  330. data/lib/mako/data/template_creator/src/assets/materia/images/bullets.png +0 -0
  331. data/lib/mako/data/template_creator/src/assets/materia/images/center.png +0 -0
  332. data/lib/mako/data/template_creator/src/assets/materia/images/close-x.png +0 -0
  333. data/lib/mako/data/template_creator/src/assets/materia/images/fullscreenPopup_close.png +0 -0
  334. data/lib/mako/data/template_creator/src/assets/materia/images/importIcon.png +0 -0
  335. data/lib/mako/data/template_creator/src/assets/materia/images/italic.png +0 -0
  336. data/lib/mako/data/template_creator/src/assets/materia/images/justify.png +0 -0
  337. data/lib/mako/data/template_creator/src/assets/materia/images/left.png +0 -0
  338. data/lib/mako/data/template_creator/src/assets/materia/images/oml-href-disabled.png +0 -0
  339. data/lib/mako/data/template_creator/src/assets/materia/images/oml-href.png +0 -0
  340. data/lib/mako/data/template_creator/src/assets/materia/images/oml-pagelink-disabled.png +0 -0
  341. data/lib/mako/data/template_creator/src/assets/materia/images/oml-pagelink.png +0 -0
  342. data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-delete.png +0 -0
  343. data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-disabled.png +0 -0
  344. data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-edit.png +0 -0
  345. data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip.png +0 -0
  346. data/lib/mako/data/template_creator/src/assets/materia/images/pencil.png +0 -0
  347. data/lib/mako/data/template_creator/src/assets/materia/images/right.png +0 -0
  348. data/lib/mako/data/template_creator/src/assets/materia/images/underline.png +0 -0
  349. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayButton.png +0 -0
  350. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPauseButton.png +0 -0
  351. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPauseButton_over.png +0 -0
  352. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPlayButton.png +0 -0
  353. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPlayButton_over.png +0 -0
  354. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerSoundButton.png +0 -0
  355. data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerSoundButton_over.png +0 -0
  356. data/lib/mako/data/template_creator/src/assets/materia/styles/creatorStyle.css +63 -0
  357. data/lib/mako/data/template_creator/src/assets/materia/styles/style.css +1127 -0
  358. data/lib/mako/data/template_creator/src/assets/materia/swf/embeddedfonts.swf +0 -0
  359. data/lib/mako/data/template_creator/src/assets/materia/swf/helpBubble.swf +0 -0
  360. data/lib/mako/data/template_creator/src/assets/materia/swf/kogneatoSymbols.swf +0 -0
  361. data/lib/mako/data/template_creator/src/assets/materia/swf/videobg.swf +0 -0
  362. data/lib/mako/data/template_creator/src/components/SmallRichTextEditor.mxml +678 -0
  363. data/lib/mako/data/template_creator/src/components/SmallRichTextEditorToolbar.mxml +133 -0
  364. data/lib/mako/data/templates/html/README.md +11 -0
  365. data/lib/mako/data/templates/html/_creator/build.yaml +12 -0
  366. data/lib/mako/data/templates/html/_creator/creator.html +19 -0
  367. data/lib/mako/data/templates/html/_creator/css/creator.less +29 -0
  368. data/lib/mako/data/templates/html/_creator/js/creator.coffee +122 -0
  369. data/lib/mako/data/templates/html/_creator/test.html +0 -0
  370. data/lib/mako/data/templates/html/_engine/build.yaml +12 -0
  371. data/lib/mako/data/templates/html/_engine/css/widget.scss +18 -0
  372. data/lib/mako/data/templates/html/_engine/js/widget.coffee +143 -0
  373. data/lib/mako/data/templates/html/_engine/widget.html +21 -0
  374. data/lib/mako/data/templates/html/_icons/icon-275.png +0 -0
  375. data/lib/mako/data/templates/html/_icons/icon-394.png +0 -0
  376. data/lib/mako/data/templates/html/_icons/icon-60.png +0 -0
  377. data/lib/mako/data/templates/html/_icons/icon-92.png +0 -0
  378. data/lib/mako/data/templates/html/_score/score_module.php +48 -0
  379. data/lib/mako/data/templates/html/_score/test_score_module.php +157 -0
  380. data/lib/mako/data/templates/html/_screen-shots/1-thumb.png +0 -0
  381. data/lib/mako/data/templates/html/_screen-shots/1.png +0 -0
  382. data/lib/mako/data/templates/html/_screen-shots/2-thumb.png +0 -0
  383. data/lib/mako/data/templates/html/_screen-shots/2.png +0 -0
  384. data/lib/mako/data/templates/html/_screen-shots/3-thumb.png +0 -0
  385. data/lib/mako/data/templates/html/_screen-shots/3.png +0 -0
  386. data/lib/mako/data/templates/html/build.yaml +4 -0
  387. data/lib/mako/data/templates/html/demo.yaml +7 -0
  388. data/lib/mako/data/templates/html/install.yaml +94 -0
  389. data/lib/mako/path.rb +48 -0
  390. data/lib/mako/scaffold.rb +69 -0
  391. metadata +597 -0
@@ -0,0 +1,295 @@
1
+ /* See the file "LICENSE.txt" for the full license governing this code. */
2
+ package nm.ui
3
+ {
4
+ import flash.events.Event;
5
+ import flash.events.FocusEvent;
6
+ import flash.text.TextField;
7
+ import flash.text.TextFieldType;
8
+ import flash.text.TextFormat;
9
+ public class ScrollText_base extends Component
10
+ {
11
+ private var vScroll:ScrollBar;
12
+ public var tf:TextField;
13
+ private var tf_format:TextFormat;
14
+ private var focused:Boolean;
15
+ private var lines:Number;
16
+ private var linesPerPage:Number;
17
+ private var updateTimeout:Number;
18
+ private var blocker:ContentBlocker;
19
+ private var __enabled:Boolean
20
+ private var _editable:Boolean;
21
+ private var _pendingText:String;
22
+ function ScrollText_base(width:Number, height:Number, text:String = '', textFormat:TextFormat = null)
23
+ {
24
+ super(true, width, height);
25
+ focused = false;
26
+ _enabled = true;
27
+ if(textFormat is TextFormat && textFormat != null) setStyle('textFormat', textFormat);
28
+ else setStyle("textFormat", new TextFormat());
29
+ addEventListener(FocusEvent.FOCUS_IN, onSetFocus);
30
+ addEventListener(FocusEvent.FOCUS_OUT, onKillFocus);
31
+ tf = new TextField();
32
+ tf.useRichTextClipboard = true;
33
+ tf.background = true;
34
+ tf.border = true;
35
+ editable = true;
36
+ setText(text);
37
+ tf.addEventListener(Event.SCROLL, onSelectionScroll);
38
+ }
39
+ public override function draw():void
40
+ {
41
+ super.draw();
42
+ addChild(tf);
43
+ redraw();
44
+ //Set textfield text if there is text waiting to be added
45
+ if(_pendingText) setText(_pendingText);
46
+ }
47
+ protected override function styleDefaults():void
48
+ {
49
+ setStyle('bgColor', 0xFFFFFF)
50
+ setStyle('frameW', 1);
51
+ setStyle('embedFonts', false);
52
+ setStyle('textFormat', new TextFormat('Arial', 12, 0 ));
53
+ setStyle('showBorder', true);
54
+ }
55
+ public override function redraw():void
56
+ {
57
+ tf.embedFonts = getStyle('embedFonts')
58
+ //////trace('embed ' + tf.embedFonts)
59
+ textFormat = getStyle('textFormat')
60
+ tf.wordWrap = true;
61
+ tf.multiline = true;
62
+ drawBG();
63
+ sizeTextField();
64
+ positionScroll(); //+ZACH
65
+ super.redraw();
66
+ }
67
+ protected function drawBG():void{}
68
+ private function sizeTextField():void
69
+ {
70
+ var calcWidth:Number = width;
71
+ if(vScroll != null) calcWidth -= vScroll.width;
72
+ tf.width = calcWidth;
73
+ tf.height = height;
74
+ }
75
+ private function showScroll():void
76
+ {
77
+ if(vScroll == null)
78
+ {
79
+ var lineHeight:int = tf.getLineMetrics(0).height;
80
+ var frameW:Number = getStyle('frameW');
81
+ vScroll = new ScrollBar();
82
+ addChild(vScroll);
83
+ vScroll.totalLines = tf.textHeight/lineHeight; //tf.maxScrollV;
84
+ vScroll.linesPerPage = tf.height/lineHeight;
85
+ vScroll.scrollByLines = 3;
86
+ vScroll.addEventListener('scroll', onScroll);
87
+ vScroll.addEventListener('drag', drag);
88
+ positionScroll();
89
+ sizeTextField();
90
+ }
91
+ }
92
+ private function positionScroll():void
93
+ {
94
+ var frameW:Number = getStyle('frameW');
95
+ if(vScroll != null) vScroll.x = width-vScroll.width
96
+ }
97
+ private function hideScroll():void
98
+ {
99
+ if(vScroll == null) return;
100
+ removeChild(vScroll); vScroll = null;
101
+ sizeTextField();
102
+ }
103
+ public function get isScrollActive():Boolean
104
+ {
105
+ return vScroll is ScrollBar;
106
+ }
107
+ private function update(timeOut:Boolean=false):void
108
+ {
109
+ if(timeOut)
110
+ {
111
+ if(tf.maxScrollV > 1)
112
+ {
113
+ if(vScroll == null) showScroll();
114
+ if(vScroll.totalLines != tf.maxScrollV) vScroll.totalLines = tf.maxScrollV;
115
+ }
116
+ else
117
+ {
118
+ hideScroll();
119
+ }
120
+ }
121
+ //vScroll.removeEventListener('scroll', this); // mute for now
122
+ if(vScroll != null) vScroll.scroll = ((tf.scrollV-1)/(tf.maxScrollV-1))*100;
123
+ //vScroll.addEventListener('scroll', this); // ok, listen again
124
+ }
125
+
126
+ public function checkScrollability():void
127
+ {
128
+ tf.getCharBoundaries(0);
129
+ if (tf.maxScrollV > 1)
130
+ {
131
+ showScroll();
132
+ return;
133
+ }
134
+ hideScroll();
135
+ return;
136
+ }
137
+
138
+ //******** textfield listener functions ************//
139
+ private function onScroller():void
140
+ {
141
+ update();
142
+ ///*_global.*/clearTimeout(updateTimeout);
143
+ //updateTimeout = /*_global.*/setTimeout(this, 'update', 100, true); // do this to overcome a bug that happens during fast scrolling where textfield doesnt fire this event again
144
+ }
145
+ private function updateTimer(e:Event):void
146
+ {
147
+ }
148
+ public function onChanged():void
149
+ {
150
+ dispatchEvent(new Event('change'));//dispatchEvent({type:'change', target:this})
151
+ }
152
+ private function onSetFocus(e:Object):void
153
+ {
154
+ dispatchEvent(new Event('setFocus')); //dispatchEvent( { type:'setFocus', target:this } )
155
+ }
156
+ private function onKillFocus(e:Object):void
157
+ {
158
+ dispatchEvent(new Event('killFocus'));//dispatchEvent({type:'killFocus', target:this})
159
+ }
160
+ private function setText(text:String = ""):void
161
+ {
162
+ if(stage)
163
+ {
164
+ tf.text = text;
165
+ tf.getCharBoundaries(0); // this will update maxScrollV to the correct v alue
166
+ //tf.height;
167
+ //tf.textHeight;
168
+ if(tf.maxScrollV > 1) showScroll();
169
+ else hideScroll();
170
+ }
171
+ else
172
+ {
173
+ _pendingText = text;
174
+ }
175
+ }
176
+ private function drag(eObj:Object):void
177
+ {
178
+ if(eObj.result)
179
+ {
180
+ //tf.removeListener(this) // mute for now
181
+ }
182
+ else
183
+ {
184
+ //tf.addListener(this) // mute for now
185
+ }
186
+ }
187
+ private function onScroll(eObj:Object):void
188
+ {
189
+ var s:Number = Math.floor(eObj.result/100 * (tf.maxScrollV))+1
190
+ if(tf.scrollV != s) tf.scrollV = s
191
+ }
192
+ public function onSelectionScroll(e:Event):void
193
+ {
194
+ update();
195
+ }
196
+ public function set _enabled(val:Boolean):void
197
+ {
198
+ __enabled = val;
199
+ if (val == true && blocker != null) removeChild(blocker);
200
+ else
201
+ {
202
+ if(blocker == null) blocker = new ContentBlocker(width, height, 0xFFFFFF, 65);
203
+ else
204
+ {
205
+ blocker.height = height
206
+ blocker.width = width
207
+ }
208
+ }
209
+ }
210
+ public function get _enabled():Boolean
211
+ {
212
+ return __enabled;
213
+ }
214
+ public function get scroll():Number
215
+ {
216
+ if(!vScroll)
217
+ {
218
+ return 0;
219
+ }
220
+
221
+ return vScroll.scroll
222
+ }
223
+ public function set scroll(val:Number):void
224
+ {
225
+ if(vScroll)
226
+ {
227
+ vScroll.scroll = val;
228
+ }
229
+ }
230
+ public override function set height(val:Number):void
231
+ {
232
+ super.height = val;
233
+ if(vScroll != null) vScroll.redraw();
234
+ }
235
+ public function set text(text:String):void
236
+ {
237
+ setText(text)
238
+ }
239
+ public function get text():String
240
+ {
241
+ return tf.text;
242
+ }
243
+ public function set htmlText(text:String):void
244
+ {
245
+ tf.htmlText = text;
246
+ tf.scrollV = 0
247
+ // trace('tf.maxScrollV', tf.maxScrollV)
248
+ if(tf.maxScrollV > 1) showScroll();
249
+ }
250
+ public function get htmlText():String
251
+ {
252
+ return tf.htmlText;
253
+ }
254
+ public function set selectable(select:Boolean):void
255
+ { // <-- KEEGAN
256
+ tf.selectable = select;
257
+ }
258
+ public function get selectable():Boolean
259
+ {
260
+ return tf.selectable;
261
+ }
262
+ public function get textFormat():TextFormat
263
+ {
264
+ return tf.getTextFormat();
265
+ }
266
+ public function set textFormat(tf_format:TextFormat):void
267
+ {
268
+ this.tf_format = tf_format
269
+ tf.setTextFormat(tf_format)
270
+ tf.defaultTextFormat = tf_format;
271
+ //tf.setTextFormat(tf_format)
272
+ }
273
+ public function set editable(val:Boolean):void
274
+ {
275
+ _editable = val
276
+ tf.type = (val? TextFieldType.INPUT : TextFieldType.DYNAMIC)
277
+ }
278
+ public function get editable():Boolean
279
+ {
280
+ return _editable
281
+ }
282
+ public function get isSelectable():Boolean
283
+ {
284
+ return tf.embedFonts;
285
+ }
286
+ public function get embedFonts():Boolean
287
+ {
288
+ return tf.embedFonts;
289
+ }
290
+ public function set embedFonts(tf_embed:Boolean):void
291
+ {
292
+ setStyle('embedFonts', tf_embed);
293
+ }
294
+ }
295
+ }
@@ -0,0 +1,247 @@
1
+ package nm.ui
2
+ {
3
+ import flash.display.DisplayObject;
4
+ import flash.display.Sprite;
5
+ import flash.events.Event;
6
+ import flash.events.MouseEvent;
7
+ import flash.geom.Matrix;
8
+ import flash.geom.Rectangle;
9
+ import flash.geom.Transform;
10
+ import flash.text.TextField;
11
+ public class SimpleScrollBar extends Sprite
12
+ {
13
+ private var _linkedTF:TextField;
14
+ private var _track:Sprite
15
+ private var _thumb:Sprite
16
+ private var _minThumbHeight:Number = 50
17
+ private var _lastMouseY:Number
18
+ private var _isDragging:Boolean = false
19
+ private var _linkedSprite:Sprite;
20
+ public var clickJumpSize:uint = 15
21
+ private var _padding:uint
22
+ private var _color:int
23
+ /**
24
+ * Creates a simple Scroll bar that is the same height as the linked item. You must manually place the scrollbar after creating it.
25
+ * @param linkedItem Either a textfield or a Sprite using scrollrect for vertical scrolling
26
+ * @param padding Padding in pixels added to top and bottom of the scroll bar.
27
+ *
28
+ */
29
+ public function SimpleScrollBar(linkedItem:DisplayObject, padding:uint=10, color:int=0x000000)
30
+ {
31
+ super();
32
+ _padding = padding
33
+ _color = color
34
+ if(linkedItem is TextField)
35
+ {
36
+ _linkedTF = linkedItem as TextField
37
+ _linkedTF.addEventListener(Event.SCROLL, onTFScroll, false, 0, true)
38
+ _linkedTF.addEventListener(Event.CHANGE, onTFChange, false, 0, true)
39
+ }
40
+ else if(linkedItem is Sprite)
41
+ {
42
+ _linkedSprite = linkedItem as Sprite
43
+ _linkedSprite.addEventListener(MouseEvent.MOUSE_WHEEL, onSpriteScrollWheel, false, 0, true)
44
+ }
45
+ addEventListener(MouseEvent.CLICK, onClick, false, 0, true)
46
+ addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown, false, 0, true)
47
+ _track = new Sprite()
48
+ _thumb = new Sprite()
49
+ addChild(_track)
50
+ addChild(_thumb)
51
+ alpha = .4
52
+ draw()
53
+ }
54
+ /**
55
+ * onChange handler for textfields
56
+ *
57
+ * @param e
58
+ *
59
+ */
60
+ private function onTFChange(e:Event):void
61
+ {
62
+ draw();
63
+ }
64
+ /**
65
+ * onScroll Handler for textfields
66
+ *
67
+ * @param e
68
+ *
69
+ */
70
+ private function onTFScroll(e:* = null):void
71
+ {
72
+ if(!_isDragging)
73
+ {
74
+ _thumb.y = (_linkedTF.scrollV-1)/(_linkedTF.maxScrollV-1) * (_track.height - _thumb.height ) //+ _padding
75
+ }
76
+ }
77
+ /**
78
+ *
79
+ *
80
+ */
81
+ private function onSpriteScroll():void
82
+ {
83
+ if(!_isDragging)
84
+ {
85
+ var trackHeight:Number = _linkedSprite.scrollRect.height - _padding * 2
86
+ var bounds:Rectangle = getBoundsWithoutScrollRect(_linkedSprite)
87
+ _thumb.y = (_linkedSprite.scrollRect.y) / (bounds.height - _linkedSprite.scrollRect.height) * (trackHeight - _thumb.height )
88
+ }
89
+ }
90
+ protected function onSpriteScrollWheel(event:MouseEvent):void
91
+ {
92
+ _thumb.y -= ( event.delta)
93
+ // keep the thumb inside the bounds
94
+ if(_thumb.y < 0) _thumb.y = 0
95
+ else if(_thumb.y + _thumb.height > _track.height) _thumb.y = _track.height - _thumb.height
96
+ // update the container
97
+ if(_linkedSprite) updateSpriteScrollPosition();
98
+ }
99
+ private function updateTFScroll():void
100
+ {
101
+ _linkedTF.scrollV = ((_thumb.y / (_track.height - _thumb.height )) * (_linkedTF.maxScrollV-1))+1
102
+ }
103
+ private function updateSpriteScrollPosition():void
104
+ {
105
+ var bounds:Rectangle = getBoundsWithoutScrollRect(_linkedSprite)
106
+ var sRect:Rectangle = _linkedSprite.scrollRect
107
+ sRect.y = (_thumb.y / (_track.height - _thumb.height )) * (bounds.height - sRect.height)
108
+ _linkedSprite.scrollRect = sRect
109
+ }
110
+ /**
111
+ * This function works like DisplayObject.getBounds(), except it will find the
112
+ * bounds of any display object, even after its scrollRect has been set.
113
+ *
114
+ * @param displayObject - a display object that may have a scrollRect applied
115
+ * @return a rectangle describing the dimensions of the unmasked content
116
+ */
117
+ private function getBoundsWithoutScrollRect ( displayObject:DisplayObject ) :Rectangle
118
+ {
119
+ var bounds:Rectangle
120
+ var transform:Transform
121
+ var toGlobalMatrix:Matrix
122
+ var currentMatrix:Matrix;
123
+ transform = displayObject.transform;
124
+ currentMatrix = transform.matrix;
125
+ toGlobalMatrix = transform.concatenatedMatrix;
126
+ toGlobalMatrix.invert();
127
+ transform.matrix = toGlobalMatrix;
128
+ bounds = transform.pixelBounds.clone();
129
+ transform.matrix = currentMatrix;
130
+ return bounds;
131
+ }
132
+ /**
133
+ * Event Handler for mouse button down
134
+ * @param e
135
+ *
136
+ */
137
+ private function onMouseDown(e:MouseEvent):void
138
+ {
139
+ e.stopPropagation()
140
+ _lastMouseY = mouseY
141
+ _isDragging = true
142
+ stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove, false, 0, true)
143
+ stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp, false, 0, true)
144
+ }
145
+ /**
146
+ * Event Handler for mouse movement while dragging the scroll thumb
147
+ *
148
+ * @param e
149
+ *
150
+ */
151
+ private function onMouseMove(e:MouseEvent):void
152
+ {
153
+ _thumb.y += ( mouseY - _lastMouseY)
154
+ _lastMouseY = mouseY
155
+ // keep the thumb inside the bounds
156
+ if(_thumb.y < 0) _thumb.y = 0
157
+ else if(_thumb.y + _thumb.height > _track.height) _thumb.y = _track.height - _thumb.height
158
+ // update the container
159
+ if(_linkedTF) updateTFScroll()
160
+ if(_linkedSprite) updateSpriteScrollPosition();
161
+ }
162
+ private function onMouseUp(e:MouseEvent):void
163
+ {
164
+ _isDragging = false
165
+ stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove)
166
+ stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp)
167
+ }
168
+ private function onClick(e:MouseEvent):void
169
+ {
170
+ if(e.target == _track)
171
+ {
172
+ if(_linkedTF)
173
+ {
174
+ if(e.localY < _thumb.y) _linkedTF.scrollV--
175
+ else _linkedTF.scrollV++
176
+ }
177
+ if(_linkedSprite)
178
+ {
179
+ var trackHeight:Number = _linkedSprite.scrollRect.height - _padding * 2
180
+ var sRect:Rectangle = _linkedSprite.scrollRect
181
+ var bounds:Rectangle = getBoundsWithoutScrollRect(_linkedSprite)
182
+ if(e.localY < _thumb.y + _padding) sRect.y -= clickJumpSize
183
+ else sRect.y += clickJumpSize
184
+ // keep in bounds
185
+ if(sRect.y < 0 ) sRect.y = 0
186
+ else if(sRect.y > bounds.height - _linkedSprite.height) sRect.y = bounds.height - _linkedSprite.height
187
+ _linkedSprite.scrollRect = sRect
188
+ onSpriteScroll()
189
+ }
190
+ }
191
+ }
192
+ public function draw():void
193
+ {
194
+ var thumbHeight:Number
195
+ var trackHeight:Number
196
+ _track.graphics.clear()
197
+ _thumb.graphics.clear()
198
+ // Textfields
199
+ if(_linkedTF)
200
+ {
201
+ trackHeight = _linkedTF.height - _padding * 2
202
+ thumbHeight = (trackHeight/_linkedTF.textHeight) * trackHeight
203
+ thumbHeight = thumbHeight > _minThumbHeight ? thumbHeight : _minThumbHeight
204
+ // Draw if needed
205
+ if(thumbHeight < trackHeight)
206
+ {
207
+ _track.graphics.beginFill(_color, 1)
208
+ _track.graphics.drawRoundRect(0, _padding, 6, trackHeight, 5, 8)
209
+ _track.graphics.endFill()
210
+ _thumb.graphics.beginFill(_color, .65)
211
+ _thumb.graphics.drawRoundRect(0, _padding, 6, thumbHeight , 5, 8)
212
+ _thumb.graphics.endFill()
213
+ onTFScroll()
214
+ }
215
+ }
216
+ // ScrollRect Sprites
217
+ else if(_linkedSprite && _linkedSprite.scrollRect)
218
+ {
219
+ trackHeight = _linkedSprite.scrollRect.height - _padding * 2
220
+ thumbHeight = (trackHeight/_linkedSprite.height) * trackHeight
221
+ thumbHeight = thumbHeight > _minThumbHeight ? thumbHeight : _minThumbHeight
222
+ // Draw if needed
223
+ if(thumbHeight < _linkedSprite.height)
224
+ {
225
+ _track.graphics.beginFill(_color, .5)
226
+ _track.graphics.drawRoundRect(0, _padding, 6, trackHeight, 5, 8)
227
+ _track.graphics.endFill()
228
+ _thumb.graphics.beginFill(_color, 1)
229
+ _thumb.graphics.drawRoundRect(0, _padding, 6, thumbHeight , 5, 8)
230
+ _thumb.graphics.endFill()
231
+ }
232
+ }
233
+ }
234
+ public function shutdown():void
235
+ {
236
+ if(_linkedTF)
237
+ {
238
+ _linkedTF.removeEventListener(Event.SCROLL, onTFScroll)
239
+ _linkedTF.removeEventListener(Event.CHANGE, onTFChange)
240
+ }
241
+ removeEventListener(MouseEvent.CLICK, onClick)
242
+ removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown)
243
+ _linkedTF = null
244
+ _linkedSprite = null
245
+ }
246
+ }
247
+ }
@@ -0,0 +1,34 @@
1
+ /* See the file "LICENSE.txt" for the full license governing this code. */
2
+ package nm.ui
3
+ {
4
+ import flash.display.MovieClip;
5
+ import flash.display.Stage;
6
+ public class StageRef extends MovieClip
7
+ {
8
+ private var _stageRef:Stage;
9
+ private static var _instance:StageRef;
10
+ private static var _allowInstantiation:Boolean;
11
+ public static function getInstance():StageRef {
12
+ if(_instance == null) {
13
+ _allowInstantiation = true;
14
+ _instance = new StageRef();
15
+ _allowInstantiation = false;
16
+ }
17
+ return _instance;
18
+ }
19
+ public static function init(stageRef:Stage):void {
20
+ getInstance()._stageRef = stageRef;
21
+ }
22
+ public function StageRef():void {
23
+ if(!_allowInstantiation) {
24
+ throw new Error("Error: instantiation failed, use StageRef.getInstance() instead of new");
25
+ }
26
+ }
27
+ public static function stageWidth():Number {
28
+ return getInstance()._stageRef.stageWidth;
29
+ }
30
+ public static function stageHeight():Number {
31
+ return getInstance()._stageRef.stageHeight;
32
+ }
33
+ }
34
+ }