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,313 @@
1
+ package materia.questionStorage
2
+ {
3
+ import materia.CreatorConfig;
4
+ import materia.utils.CommonUtils;
5
+ import mx.collections.ArrayCollection;
6
+ import mx.controls.Alert;
7
+ import mx.utils.ObjectUtil;
8
+ public class QuestionGroup
9
+ {
10
+ public static const TYPE_QGROUP:int = 1;
11
+ public static const TYPE_QSET:int = 0;
12
+ public static const TYPE_QUESTION:int = 2;
13
+ public var id:Number;
14
+ public var assets:Array = []; // an array of assets used by this group
15
+ [Bindable]
16
+ public var items:Array; // each kid can be a questionGroup, or a Question
17
+ public var name:String;
18
+ public var options:Object;
19
+ public var rand:Boolean;
20
+ public function QuestionGroup(name:String = "", opts:Object = null, random:Boolean = false,
21
+ id:Number = 0):void
22
+ {
23
+ this.name = name
24
+ items = new Array();
25
+ this.options = opts == null? new Object() : opts;
26
+ this.rand = false;
27
+ this.id = id;
28
+ }
29
+ public static function convertToQGroup(obj:Object):QuestionGroup
30
+ {
31
+ return QuestionGroup(convertObject(obj, TYPE_QGROUP));
32
+ }
33
+ public static function convertToQSet(obj:Object):QuestionSet
34
+ {
35
+ return QuestionSet(convertObject(obj, TYPE_QSET));
36
+ }
37
+ public static function convertToQuestion(obj:Object):Question
38
+ {
39
+ return Question(convertObject(obj, TYPE_QUESTION));
40
+ }
41
+ public static function copyQuestionArray(questionsArray:Array):Array
42
+ {
43
+ var copy:Array = [];
44
+ for (var i:int = 0; i < questionsArray.length; i++)
45
+ {
46
+ var q:Question = questionsArray[i];
47
+ copy.push(q.clone());
48
+ }
49
+ return copy;
50
+ }
51
+ // can return a question or a question group (or a question set?)
52
+ private static function convertObject(obj:Object, type:int = -1):*
53
+ {
54
+ if (obj == null)
55
+ {
56
+ return null;
57
+ }
58
+ if (obj is Boolean)
59
+ {
60
+ return null;
61
+ }
62
+ // *HACK CODE END*
63
+ // check if obj is a question
64
+ if (obj.hasOwnProperty("questions"))
65
+ {
66
+ return Question.convertObject(obj); // early return
67
+ }
68
+ var qset:*;
69
+ switch (type)
70
+ {
71
+ case TYPE_QSET:
72
+ qset = new QuestionSet();
73
+ break;
74
+ case TYPE_QGROUP:
75
+ default:
76
+ qset = new QuestionGroup(); // defaulting to question group
77
+ break;
78
+ }
79
+ qset.name = obj.name;
80
+ var k:Array = new Array();
81
+ for each(var s:Object in obj.items)
82
+ {
83
+ k.push(convertObject(s));
84
+ }
85
+ qset.items = k;
86
+ qset.id = obj.id;
87
+ qset.options = CommonUtils.convertArrayToObject(obj.options); // make sure options is an object
88
+ qset.rand = obj.rand;
89
+ qset.assets = obj.assets;
90
+ return qset;
91
+ }
92
+ private static function isSameOptions(obj1:Object, obj2:Object):Boolean
93
+ {
94
+ var s:String;
95
+ for (s in obj1)
96
+ {
97
+ if (obj2[s] == undefined)
98
+ {
99
+ return false;
100
+ }
101
+ if (String(obj1[s]) != String(obj2[s]))
102
+ {
103
+ return false;
104
+ }
105
+ }
106
+ for (s in obj2)
107
+ {
108
+ if (obj1[s] == undefined)
109
+ {
110
+ return false;
111
+ }
112
+ }
113
+ return true;
114
+ }
115
+ private static function sameQuestionGroupElement(obj1:*, obj2:*):Boolean
116
+ {
117
+ if ((obj1 is QuestionGroup && obj2 is QuestionGroup) ||
118
+ (obj1 is QuestionSet && obj2 is QuestionSet))
119
+ {
120
+ var qg1:QuestionGroup = obj1;
121
+ var qg2:QuestionGroup = obj2;
122
+ return qg1.isSameQuestionGroup(qg2);
123
+ }
124
+ else if (obj1 is Question && obj2 is Question)
125
+ {
126
+ var q1:Question = obj1;
127
+ var q2:Question = obj2;
128
+ return q1.isSameQuestion(q2);
129
+ }
130
+ return false;
131
+ }
132
+ public function addChild(child:Object):void
133
+ {
134
+ items.push(child);
135
+ }
136
+ public function addGroup(group:QuestionGroup):void
137
+ {
138
+ addChild(group);
139
+ }
140
+ public function addOption(name:String, value:*):void
141
+ {
142
+ options[name] = value;
143
+ }
144
+ public function addQAArrayCollection(arr:ArrayCollection, questionFieldName:String,
145
+ answerFieldName:String):void
146
+ {
147
+ var j:int;
148
+ for (var i:int = 0; i < arr.length; i++)
149
+ {
150
+ var q:Question = new Question("Question Answer");
151
+ if (arr[i][questionFieldName] is Array)
152
+ {
153
+ for (j = 0; j < arr[i][questionFieldName].length; j++)
154
+ {
155
+ q.addText(arr[i][questionFieldName][j]);
156
+ }
157
+ }
158
+ else
159
+ {
160
+ q.addText(arr[i][questionFieldName]);
161
+ }
162
+ if (arr[i][answerFieldName] is Array)
163
+ {
164
+ for (j = 0; j < arr[i][answerFieldName].length; j++)
165
+ {
166
+ q.addAnswer(arr[i][answerFieldName][j]);
167
+ }
168
+ }
169
+ else
170
+ {
171
+ q.addText(arr[i][answerFieldName])
172
+ }
173
+ addQuestion(q);
174
+ }
175
+ }
176
+ public function addQuestion(question:Question):Question
177
+ {
178
+ addChild(question)
179
+ return question;
180
+ }
181
+ public function clone():QuestionGroup
182
+ {
183
+ var clone:QuestionGroup = new QuestionGroup(name, options, rand, id);
184
+ for (var i:String in options)
185
+ {
186
+ clone.options[i] = options[i];
187
+ }
188
+ for (var j:String in items)
189
+ {
190
+ clone.items[j] = items[j].clone();
191
+ }
192
+ return clone;
193
+ }
194
+ public function convertToObject():Object
195
+ {
196
+ var o:Object = new Object();
197
+ o["items"] = new Array();
198
+ for (var i:int = 0; i < items.length; i++)
199
+ {
200
+ o["items"].push(items[i].convertToObject());
201
+ }
202
+ o["name"] = name;
203
+ o["options"] = CommonUtils.convertArrayToObject(options);
204
+ o["rand"] = rand;
205
+ o["assets"] = assets;
206
+ return ObjectUtil.copy(o); // enigma was editing the arrays inside of question sets
207
+ // which were references instead of copies
208
+ }
209
+ public function getChild(index:int):Object
210
+ {
211
+ return items[index];
212
+ }
213
+ public function getQuestions():Array
214
+ {
215
+ var q:Array = new Array();
216
+ for (var i:int = 0; i < items.length; i++)
217
+ {
218
+ if (items[i] is Question)
219
+ {
220
+ q.push(items[i]);
221
+ }
222
+ else
223
+ {
224
+ if (!(items[i] is QuestionGroup))
225
+ {
226
+ if(items[i] != null)
227
+ {
228
+ append(QuestionGroup.convertToQGroup(items[i]).getQuestions(), q);
229
+ }
230
+ }
231
+ else
232
+ {
233
+ append(items[i].getQuestions(), q);
234
+ }
235
+ }
236
+ }
237
+ return q;
238
+ }
239
+ /**
240
+ * Retruns true if this question group represents the same game ( same questions and groupings )
241
+ * as the other give group.
242
+ *
243
+ * This is used by creator manager to check if the user has made changes to a qGroup with a creator.
244
+ */
245
+ public function isSameQuestionGroup(otherQuestionGroup:QuestionGroup):Boolean
246
+ {
247
+ if (otherQuestionGroup == null)
248
+ {
249
+ return false;
250
+ }
251
+ // they should have the same name
252
+ if (this.name != otherQuestionGroup.name)
253
+ {
254
+ return false;
255
+ }
256
+ // NOTE: was using object compare like this:
257
+ // ObjectUtil.compare(this.options, otherQuestionGroup.options) != 0
258
+ // but it was having 0 != "0" ( the string)
259
+ // so doing it the different way
260
+ if (isSameOptions(this.options, otherQuestionGroup.options) == false)
261
+ {
262
+ return false;
263
+ }
264
+ if (this.rand != otherQuestionGroup.rand)
265
+ {
266
+ return false;
267
+ }
268
+ // now recursively check the items
269
+ if (items.length != otherQuestionGroup.items.length)
270
+ {
271
+ return false;
272
+ }
273
+ for (var i:int = 0; i < items.length; i++)
274
+ {
275
+ if (!sameQuestionGroupElement(this.items[i], otherQuestionGroup.items[i]))
276
+ {
277
+ return false;
278
+ }
279
+ }
280
+ return true; // it passed all of the tests, same qGroup
281
+ }
282
+ public function get length():int
283
+ {
284
+ return items.length;
285
+ }
286
+ public function removeItemAt(item:int):void
287
+ {
288
+ items.splice(item, 1);
289
+ }
290
+ private function append(items:Array, arr:Array):void
291
+ {
292
+ for (var i:int = 0; i < items.length; i++)
293
+ {
294
+ arr.push(items[i]);
295
+ }
296
+ }
297
+ public function toString():String
298
+ {
299
+ var str:String = "[QGroup]:'"+name+ "' " + items.length + ' items'
300
+ for(var i:String in options)
301
+ {
302
+ str += "\n QG Option: '" + i + "' = '"+ options[i] + "'"
303
+ }
304
+ str+= "\n{\n"
305
+ for each(i in items)
306
+ {
307
+ str += " " + i.toString() + '\n'
308
+ }
309
+ str+= "\n}"
310
+ return str
311
+ }
312
+ }
313
+ }
@@ -0,0 +1,21 @@
1
+ package materia.questionStorage
2
+ {
3
+ public class QuestionSet extends QuestionGroup
4
+ {
5
+ public function QuestionSet(name:String="", random:Boolean=false, id:Number=0)
6
+ {
7
+ super(name, null, random, id);
8
+ }
9
+ public override function clone():QuestionGroup{
10
+ var clone:QuestionSet = new QuestionSet(name, rand, id);
11
+ var i:String;
12
+ for(i in items){
13
+ clone.items[i] = items[i].clone();
14
+ }
15
+ for(i in options){
16
+ clone.options[i] = options[i];
17
+ }
18
+ return clone;
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,196 @@
1
+ package materia.toolTips
2
+ {
3
+ import flash.display.Sprite;
4
+ import flash.filters.DropShadowFilter;
5
+ import flash.text.TextField;
6
+ import flash.text.TextFieldAutoSize;
7
+ import flash.text.TextFormat;
8
+ import mx.core.UIComponent;
9
+ public class KogneatoToolTip extends UIComponent
10
+ {
11
+ //Components:
12
+ protected var bg:Sprite;
13
+ protected var tf:TextField;
14
+ //Properties:
15
+ protected var _text:String;
16
+ //Flags:
17
+ protected var _bTextChanged:Boolean;
18
+ //Statics:
19
+ protected var DEFAULT_POINTER_ORIENTATION:String = "down"; //@TODO: How do I do this?
20
+ protected var DEFAULT_MIN_TF_WIDTH:int = 50;
21
+ protected var DEFAULT_MAX_TF_WIDTH:int = 300;
22
+ protected var DEFAULT_PTR_SIZE:int = 10;
23
+ protected var DEFAULT_PADDING:int = 7;
24
+ public function KogneatoToolTip()
25
+ {
26
+ super();
27
+ mouseEnabled = mouseChildren = false;
28
+ }
29
+ public function set text(val:String):void
30
+ {
31
+ _text = val;
32
+ _bTextChanged = true;
33
+ invalidateProperties();
34
+ }
35
+ public function get text():String
36
+ {
37
+ return _text;
38
+ }
39
+ protected override function createChildren():void
40
+ {
41
+ super.createChildren();
42
+ if(!bg)
43
+ {
44
+ bg = new Sprite();
45
+ addChild(bg);
46
+ }
47
+ if(!tf)
48
+ {
49
+ tf = new TextField();
50
+ //tf.text = 'XXXXXXXXXXXXXXXXX';
51
+ //tf.width = 300;
52
+ //tf.height = 1;
53
+ //tf.width = 1;
54
+ tf.autoSize = TextFieldAutoSize.LEFT;
55
+ //tf.multiline = tf.wordWrap = true;
56
+ //tf.setStyle('textAlign', 'center');
57
+ //tf.maxWidth = DEFAULT_MAX_TF_WIDTH;
58
+ addChild(tf);
59
+ }
60
+ }
61
+ protected override function commitProperties():void
62
+ {
63
+ super.commitProperties();
64
+ if(_bTextChanged)
65
+ {
66
+ _bTextChanged = false;
67
+ tf.text = _text;
68
+ tf.setTextFormat(new TextFormat('Verdana', 12, 0xFFFFFF, false, false, false, null, null, 'center'));
69
+ if(tf.width > DEFAULT_MAX_TF_WIDTH)
70
+ {
71
+ tf.width = DEFAULT_MAX_TF_WIDTH;
72
+ tf.multiline = tf.wordWrap = true;
73
+ }
74
+ else if(tf.width < DEFAULT_MIN_TF_WIDTH)
75
+ {
76
+ tf.autoSize = TextFieldAutoSize.NONE;
77
+ tf.width = DEFAULT_MIN_TF_WIDTH;
78
+ }
79
+ invalidateDisplayList();
80
+ }
81
+ }
82
+ /*
83
+ public override function get height():Number
84
+ {
85
+ return bg.height;
86
+ }*/
87
+ protected override function measure():void
88
+ {
89
+ super.measure();
90
+ measuredWidth = bg.width;
91
+ measuredHeight = bg.height;
92
+ measuredMinWidth = 50;
93
+ measuredMinHeight = 30;
94
+ }
95
+ protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
96
+ {
97
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
98
+ var pointerOrientation:String = getStyle("pointerOrientation");
99
+ var padding:int = DEFAULT_PADDING;
100
+ var strokeWidth:int = 4;
101
+ var ptrOffset:int = getStyle("pointerOffset");
102
+ //trace('DRAWING');
103
+ var tw:int = padding * 2 + tf.width; //tip width
104
+ var th:int = padding * 2 + tf.height; //tip height
105
+ var twh:int = tw / 2;
106
+ var thh:int = th / 2;
107
+ var ps:int = DEFAULT_PTR_SIZE;
108
+ var psh:int = ps / 2;
109
+ var cr:int = 4; //radius
110
+ bg.graphics.clear();
111
+ bg.graphics.lineStyle(strokeWidth, 0xFFFFFF, 0.3, true);
112
+ //Draw bubble with pointer oriented down
113
+ bg.graphics.beginFill(0x232323, .95);//0xe6e2d1
114
+ bg.graphics.moveTo(cr, 0);
115
+ bg.graphics.curveTo(0, 0, 0, cr);
116
+ bg.graphics.lineTo(0, th - cr);
117
+ bg.graphics.curveTo(0, th, cr, th);
118
+ bg.graphics.lineTo(twh - ps + ptrOffset, th);
119
+ bg.graphics.lineTo(twh + ptrOffset, th + ps);
120
+ bg.graphics.lineTo(twh + ps + ptrOffset, th);
121
+ bg.graphics.lineTo(tw - cr, th);
122
+ bg.graphics.curveTo(tw, th, tw, th - cr);
123
+ bg.graphics.lineTo(tw, cr);
124
+ bg.graphics.curveTo(tw, 0, tw - cr, 0);
125
+ bg.graphics.lineTo(cr, 0);
126
+ if(pointerOrientation == 'up')
127
+ {
128
+ bg.scaleY = -1;
129
+ //@TODO @HACK SUPER SUPER HACK ATTACK
130
+ if(ptrOffset == 0)
131
+ {
132
+ bg.y += bg.height - strokeWidth;
133
+ }
134
+ tf.x = padding;
135
+ tf.y = ps + padding;
136
+ }
137
+ else //down
138
+ {
139
+ tf.x = padding;
140
+ tf.y = padding;
141
+ }
142
+ /*
143
+ switch(pointerOrientation)
144
+ {
145
+ case 'up':
146
+ tf.x = -twh + padding;
147
+ tf.y = ps + padding;
148
+ bg.graphics.beginFill(0xe6e2d1, .95);
149
+ bg.graphics.moveTo(-ps + ptrOffset, ps);
150
+ bg.graphics.lineTo(ptrOffset, 0);
151
+ bg.graphics.lineTo(ps + ptrOffset, ps);
152
+ bg.graphics.lineTo(twh - cr, ps);
153
+ bg.graphics.curveTo(twh, ps, twh, ps + cr);
154
+ var topY:int = ps + th;
155
+ bg.graphics.lineTo(twh, topY - cr);
156
+ bg.graphics.curveTo(twh, topY, twh - cr, topY);
157
+ bg.graphics.lineTo(-twh + cr, topY);
158
+ bg.graphics.curveTo(-twh, topY, -twh, topY - cr);
159
+ bg.graphics.lineTo(-twh, ps + cr);
160
+ bg.graphics.curveTo(-twh, ps, -twh + cr, ps);
161
+ bg.graphics.lineTo(-ps + ptrOffset, ps);
162
+ bg.graphics.endFill();
163
+ break;
164
+ case 'down':
165
+ default:
166
+ tf.x = -twh + padding;
167
+ tf.y = -ps - padding - tf.height;
168
+ bg.graphics.beginFill(0xe6e2d1, .95);
169
+ bg.graphics.moveTo(-ps + ptrOffset, -ps);
170
+ bg.graphics.lineTo(ptrOffset, 0);
171
+ bg.graphics.lineTo(ps + ptrOffset, -ps);
172
+ bg.graphics.lineTo(twh - cr, -ps);
173
+ bg.graphics.curveTo(twh, -ps, twh, -ps - cr);
174
+ var topY:int = -ps - th;
175
+ bg.graphics.lineTo(twh, topY + cr);
176
+ bg.graphics.curveTo(twh, topY, twh - cr, topY);
177
+ bg.graphics.lineTo(-twh + cr, topY);
178
+ bg.graphics.curveTo(-twh, topY, -twh, topY + cr);
179
+ bg.graphics.lineTo(-twh, -ps - cr);
180
+ bg.graphics.curveTo(-twh, -ps, -twh + cr, -ps);
181
+ bg.graphics.lineTo(-ps + ptrOffset, -ps);
182
+ bg.graphics.endFill();
183
+ break;
184
+ }*/
185
+ //graphics.beginFill(0xFF0000, 0.2);
186
+ //graphics.drawRect(0, 0, bg.width, bg.height);
187
+ //graphics.endFill();
188
+ bg.filters = [new DropShadowFilter(3, 90, 0x0, 0.6, 2, 2, 1, 3)];
189
+ //bg.x = twh;
190
+ //bg.y = padding * 2 + th + ps;
191
+ //trace('ok so height is ' + bg.height);
192
+ setActualSize(bg.width, bg.height);
193
+ //measure();
194
+ }
195
+ }
196
+ }
@@ -0,0 +1,150 @@
1
+ package materia.toolTips
2
+ {
3
+ import flash.display.DisplayObject;
4
+ import flash.events.Event;
5
+ import flash.events.MouseEvent;
6
+ import flash.events.TimerEvent;
7
+ import flash.geom.Point;
8
+ import flash.utils.Timer;
9
+ import mx.core.Application;
10
+ import mx.core.UIComponent;
11
+ import mx.effects.Fade;
12
+ import mx.events.FlexEvent;
13
+ import mx.managers.PopUpManager;
14
+ import mx.managers.PopUpManagerChildList;
15
+ public class TipManager
16
+ {
17
+ protected static var curToolTip:KogneatoToolTip;
18
+ protected static var curTipTarget:UIComponent;
19
+ protected static var _enabled:Boolean = true;
20
+ protected static var _removeTimer:Timer;
21
+ protected static const REMOVE_DELAY:int = 10;
22
+ public function TipManager()
23
+ {
24
+ }
25
+ public static function set enabled(val:Boolean):void
26
+ {
27
+ _enabled = val;
28
+ }
29
+ public static function get enabled():Boolean
30
+ {
31
+ return _enabled;
32
+ }
33
+ public static function removeTip():void
34
+ {
35
+ _removeTimer = new Timer(REMOVE_DELAY, 1);
36
+ _removeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, handleRemoveTimerComplete);
37
+ _removeTimer.start();
38
+ if(curTipTarget)
39
+ {
40
+ curTipTarget.removeEventListener(MouseEvent.MOUSE_OUT, handleTargetMouseOut);
41
+ }
42
+ }
43
+ protected static function handleRemoveTimerComplete(event:TimerEvent = null):void
44
+ {
45
+ if(_removeTimer)
46
+ {
47
+ _removeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, handleRemoveTimerComplete);
48
+ _removeTimer = null;
49
+ }
50
+ PopUpManager.removePopUp(curToolTip);
51
+ curToolTip = null;
52
+ curTipTarget = null;
53
+ }
54
+ public static function showTip(targetUIComponent:Object, tipText:String = '', orientation:String = '', addRemoveListener:Boolean = true):void
55
+ {
56
+ if(curToolTip)
57
+ {
58
+ if(curToolTip.text == tipText)
59
+ {
60
+ //Cancel the remove timer
61
+ if(_removeTimer)
62
+ {
63
+ _removeTimer.stop();
64
+ _removeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, handleRemoveTimerComplete);
65
+ _removeTimer = null;
66
+ }
67
+ if(addRemoveListener)
68
+ {
69
+ curTipTarget.addEventListener(MouseEvent.MOUSE_OUT, handleTargetMouseOut);
70
+ }
71
+ return;
72
+ }
73
+ else
74
+ {
75
+ handleRemoveTimerComplete();
76
+ }
77
+ }
78
+ if(_enabled && tipText && tipText.length > 0)
79
+ {
80
+ curTipTarget = UIComponent(targetUIComponent);
81
+ if(addRemoveListener)
82
+ {
83
+ curTipTarget.addEventListener(MouseEvent.MOUSE_OUT, handleTargetMouseOut);
84
+ }
85
+ curToolTip = new KogneatoToolTip();
86
+ curToolTip.addEventListener(FlexEvent.UPDATE_COMPLETE, handleToolTipUpdateComplete);
87
+ if(orientation.length > 0)
88
+ {
89
+ switch(orientation)
90
+ {
91
+ case 'above':
92
+ curToolTip.setStyle("pointerOrientation", 'down');
93
+ break;
94
+ case 'below':
95
+ curToolTip.setStyle("pointerOrientation", 'up');
96
+ }
97
+ }
98
+ curToolTip.alpha = 0;
99
+ curToolTip.text = tipText;
100
+ PopUpManager.addPopUp(curToolTip, DisplayObject(Application.application), false, PopUpManagerChildList.POPUP);
101
+ }
102
+ }
103
+ protected static function handleToolTipUpdateComplete(event:Event):void
104
+ {
105
+ if(curToolTip)
106
+ {
107
+ if(curToolTip.width > 0 && curToolTip.height > 0)
108
+ {
109
+ curToolTip.removeEventListener(FlexEvent.UPDATE_COMPLETE, handleToolTipUpdateComplete);
110
+ var p:Point = UIComponent(curTipTarget).localToGlobal(new Point());
111
+ var pointerOrientation:String = curToolTip.getStyle('pointerOrientation');
112
+ //trace('pointer orientation is ' + pointerOrientation);
113
+ if(pointerOrientation == 'down' || (pointerOrientation == null && p.y - curToolTip.height > 0))
114
+ {
115
+ curToolTip.move(p.x - (curToolTip.width / 2) + (curTipTarget.width / 2), p.y - curToolTip.height);
116
+ }
117
+ else
118
+ {
119
+ curToolTip.setStyle('pointerOrientation', 'up');
120
+ curToolTip.move(p.x - (curToolTip.width / 2) + (curTipTarget.width / 2), p.y + curTipTarget.height);
121
+ }
122
+ var unfixedXPos:Number = curToolTip.x;
123
+ if(curToolTip.x + curToolTip.width + 10 > Application.application.stage.stageWidth)
124
+ {
125
+ curToolTip.x = Application.application.stage.stageWidth - 10 - curToolTip.width;
126
+ curToolTip.setStyle("pointerOffset", unfixedXPos - curToolTip.x + 2);
127
+ }
128
+ else if(curToolTip.x < 0)
129
+ {
130
+ curToolTip.x = 10;
131
+ curToolTip.setStyle("pointerOffset", unfixedXPos - curToolTip.x + 2);
132
+ }
133
+ var f:Fade = new Fade(curToolTip);
134
+ f.alphaFrom = 0.0;
135
+ f.alphaTo = 1.0;
136
+ f.duration = 100;
137
+ f.play();
138
+ }
139
+ }
140
+ }
141
+ protected static function handleTargetMouseOut(event:MouseEvent):void
142
+ {
143
+ if(curTipTarget)
144
+ {
145
+ curTipTarget.removeEventListener(MouseEvent.MOUSE_OUT, handleTargetMouseOut);
146
+ }
147
+ removeTip();
148
+ }
149
+ }
150
+ }