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,504 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
3
+ creationComplete="init();"
4
+ width="100%" height="100%"
5
+ backgroundColor="#3B3E40"
6
+ layout="absolute">
7
+ <mx:Style source="/assets/materia/styles/style.css"/>
8
+ <mx:Style source="/assets/materia/styles/creatorStyle.css"/>
9
+ <mx:Script>
10
+ <![CDATA[
11
+ import materia.components.questionAnswerDataGrid.TextInputObject;
12
+ import materia.questionStorage.*;
13
+
14
+ import mx.controls.Button;
15
+ import mx.managers.PopUpManager;
16
+
17
+ public static const NO_GRID_GIVEN:int = -1;
18
+ public static const PAGE_NAVIGATION_EVENT:String = "PAGE_NAVIGATION_EVENT"; // the event name
19
+ public static var creatorInstance:CreatorBase;
20
+ /**
21
+ * Determines which Question class QADG.addQuestion should use
22
+ * Value should be overridden in Creator to use widget's custom Question class
23
+ * Since class is dynamically referenced, it must be explictly included in widget's creator
24
+ * Simply referencing the class name will suffice
25
+ * Ex: QUESTION_TYPE = 'WordSearchQuestion';
26
+ * WordSearchQuestion;
27
+ **/
28
+ public static var QUESTION_TYPE:String = 'materia.questionStorage.Question'
29
+
30
+ protected static var _mediaLoadedCallback:Function;
31
+ protected var _creationComplete:Boolean = false; // if creation is complete
32
+ protected var _questionsWithQIDs:Array; // a list of questions that we are re-using.
33
+ [Bindable]
34
+ protected var _restrict:String = "^\u0001-\u0008\u000B-\u001F"; //Disable unprinted control characters
35
+ [Bindable]
36
+ protected var _multilineFields:Boolean = true;
37
+ [Bindable]
38
+ protected var instanceTitle:String = "";
39
+ protected var _inst_id:int = NO_GRID_GIVEN;
40
+ protected var questionSet:QuestionGroup;
41
+ protected var questionSetVersion:String = '1';
42
+ protected var _baseUrl:String = '';
43
+ public var widget:Object;
44
+
45
+ //--------------------------------------------------------------------------
46
+ //
47
+ // Javascript Callback Functions
48
+ //
49
+ //--------------------------------------------------------------------------
50
+ protected function initExistingWidget(title:String, widget:Object, qset:Object, version:String, baseUrl:String):void
51
+ {
52
+ trace('INIT EXISTING')
53
+ _baseUrl = baseUrl;
54
+ this.widget = widget;
55
+ instanceTitle = title;
56
+ if(qset)
57
+ {
58
+ questionSet = QuestionGroup.convertToQGroup(qset);
59
+ questionSetVersion = version;
60
+ }
61
+
62
+ }
63
+ //--------------------------------------------------------------------------
64
+ //
65
+ // Method Functions
66
+ //
67
+ //--------------------------------------------------------------------------
68
+ public function init():void
69
+ {
70
+ trace('CREATOR BASE INIT');
71
+ CreatorBase.creatorInstance = this;
72
+ /* save variables passed from javascript */
73
+ CreatorConfig.URL_WEB = Application.application.parameters.URL_WEB;
74
+ CreatorConfig.URL_GET_ASSET = Application.application.parameters.URL_GET_ASSET;
75
+ CreatorConfig.widget_id = Application.application.parameters.widget_id;
76
+ CreatorConfig.inst_id = Application.application.parameters.inst_id ? Application.application.parameters.inst_id : 0;
77
+ // allow static files to be hosted from subdomain and still talk to materia
78
+ if (CreatorConfig.URL_WEB.indexOf('https'))
79
+ {
80
+ Security.allowDomain(CreatorConfig.URL_WEB);
81
+ }
82
+ else
83
+ {
84
+ Security.allowInsecureDomain(CreatorConfig.URL_WEB);
85
+ }
86
+ /* create javascript callbacks */
87
+ ExternalInterface.addCallback("initNewWidget", initNewWidget);
88
+ ExternalInterface.addCallback("initExistingWidget", initExistingWidget);
89
+ ExternalInterface.addCallback("onMediaImportComplete", onMediaImported);
90
+ ExternalInterface.addCallback("onQuestionImportComplete", importQuestions);
91
+ ExternalInterface.addCallback("onRequestSave", onSaveClicked);
92
+ ExternalInterface.addCallback("onSaveComplete", onSaveComplete);
93
+ Security.loadPolicyFile(CreatorConfig.URL_WEB+'crossdomain.xml');
94
+
95
+ if (this.stage == null) addEventListener(Event.ADDED_TO_STAGE, readyToLoad, false, 0, true);
96
+ else readyToLoad();
97
+ }
98
+ protected function readyToLoad(e:Event = null):void
99
+ {
100
+ ExternalInterface.call("console.log", 'calling creator ready from flash');
101
+ ExternalInterface.call("__materia_flash_onCreatorReady");
102
+ }
103
+
104
+ //----------------------------------
105
+ // Question Importing
106
+ //----------------------------------
107
+ protected function importQuestions(questions:Object):void
108
+ {
109
+ this.startImportingSet();
110
+ if(! questions is Array )
111
+ {
112
+ questions = questions as Array;
113
+ }
114
+ for (var i:int = 0; i < questions.length; i++)
115
+ {
116
+ this.addImportedQuestion(Question.convertObject(questions[i]));
117
+ }
118
+ this.doneImportingSet();
119
+ }
120
+ protected function onMediaImported(assets:Array):void
121
+ {
122
+ trace(assets)
123
+ trace(assets.length)
124
+ _mediaLoadedCallback.apply(this, [assets]);
125
+ }
126
+ [Bindable]
127
+ public function get restrict():String
128
+ {
129
+ return _restrict;
130
+ }
131
+ public function set restrict(val:String):void
132
+ {
133
+ _restrict = val;
134
+ }
135
+ [Bindable]
136
+ public function get multilineFields():Boolean
137
+ {
138
+ return _multilineFields;
139
+ }
140
+ public function set multilineFields(val:Boolean):void
141
+ {
142
+ _multilineFields = val;
143
+ }
144
+
145
+ public function initNewWidget(widget:Object, baseUrl:String):void
146
+ {
147
+ trace('new widget init!')
148
+ this.widget = widget
149
+ // override to do something when a game is not being edited, there is no init qset coming
150
+ }
151
+ // game creators need to call this when they are publishing their game
152
+ // it checks if we can re-use questions, or if they have been edited/ created
153
+ // TODO: remove this, the new free-form qsets dont care
154
+ protected function validateQIDs(qSet:QuestionGroup):void{}
155
+
156
+ /**
157
+ * This function will be used to test if a question can be used in a game.
158
+ * Override this to allow/ deny a question from being imported into a game.
159
+ */
160
+ public function importableQuestionTestFunction(questionObject:Object):Boolean
161
+ {
162
+ // the default will be to just allow every question to pass
163
+ return true;
164
+ }
165
+ /**
166
+ * Called when questions are selected for import, and addImportedQuestion is going to be called on each of them.
167
+ * Override if the creator wants to know about this.
168
+ * It might be better to just change addImportedQuestion to addImportedQuestions?
169
+ */
170
+ public function startImportingSet():void
171
+ {
172
+ }
173
+ /**
174
+ * Called after questions are selected for import, and all addImportedQuestion calls have been executed\
175
+ * Override if the creator wants to know about this.
176
+ */
177
+ public function doneImportingSet():void
178
+ {
179
+ }
180
+ /**
181
+ * Override so you can decide what to do with the questions that are going to be imported.
182
+ */
183
+ public function addImportedQuestion(question:Question):Question
184
+ {
185
+ // add the question onto the questions with qids list
186
+ if (_questionsWithQIDs == null)
187
+ {
188
+ _questionsWithQIDs = new Array();
189
+ }
190
+ var q:Question = question.clone();
191
+ if (restrict != null && restrict != '')
192
+ {
193
+ if (removeRestrictedCharactersForImportedQuestion(q))
194
+ {
195
+ q.id = 0; //Modify imported question
196
+ }
197
+ }
198
+ if (!multilineFields)
199
+ {
200
+ if (stripNewLinesForImportedQuestion(q))
201
+ {
202
+ q.id = 0; //Modify imported question
203
+ }
204
+ }
205
+ _questionsWithQIDs.push(q);
206
+ return q;
207
+ }
208
+
209
+ public static function openMediaScreen(mediaLoadedCallback:Function):void
210
+ {
211
+ _mediaLoadedCallback = mediaLoadedCallback;
212
+ ExternalInterface.call("__materia_flash_importMedia");
213
+ }
214
+
215
+ protected function stripNewLinesForImportedQuestion(q:Question):Boolean
216
+ {
217
+ var originalString:String;
218
+ var modified:Boolean = false;
219
+ if (q.question && q.question.length > 0)
220
+ {
221
+ originalString = q.question;
222
+ q.question = stripNewLines(q.question);
223
+ if (originalString != q.question)
224
+ {
225
+ modified = true;
226
+ }
227
+ }
228
+ var curItem:Object;
229
+ var len:int = q.questions.length;
230
+ for (var i:int = 0; i < len; i++)
231
+ {
232
+ curItem = q.questions[i];
233
+ if (curItem.hasOwnProperty('text'))
234
+ {
235
+ originalString = curItem.text;
236
+ curItem.text = stripNewLines(curItem.text);
237
+ if (originalString != curItem.text)
238
+ {
239
+ modified = true;
240
+ }
241
+ }
242
+ }
243
+ len = q.answers.length;
244
+ for (i = 0; i < len; i++)
245
+ {
246
+ curItem = q.answers[i];
247
+ if (curItem.hasOwnProperty('text'))
248
+ {
249
+ originalString = curItem.text;
250
+ curItem.text = stripNewLines(curItem.text);
251
+ if (originalString != curItem.text)
252
+ {
253
+ modified = true;
254
+ }
255
+ }
256
+ }
257
+ return modified;
258
+ }
259
+ protected function stripNewLines(s:String):String
260
+ {
261
+ var re1:RegExp = new RegExp('\r\n', 'g');
262
+ var re2:RegExp = new RegExp('\n', 'g');
263
+ var re3:RegExp = new RegExp('\r', 'g');
264
+ s = s.replace(re1, ' ');
265
+ s = s.replace(re2, ' ');
266
+ s = s.replace(re3, ' ');
267
+ return s;
268
+ }
269
+ protected function removeRestrictedCharactersForImportedQuestion(q:Question):Boolean
270
+ {
271
+ var originalString:String;
272
+ var modified:Boolean = false;
273
+ if (q.question && q.question.length > 0)
274
+ {
275
+ originalString = q.question;
276
+ q.question = removeRestrictedCharacters(restrict, q.question);
277
+ if (originalString != q.question)
278
+ {
279
+ modified = true;
280
+ }
281
+ }
282
+ var curItem:Object;
283
+ var len:int = q.questions.length;
284
+ for (var i:int = 0; i < len; i++)
285
+ {
286
+ curItem = q.questions[i];
287
+ if (curItem.hasOwnProperty('text'))
288
+ {
289
+ originalString = curItem.text;
290
+ curItem.text = removeRestrictedCharacters(restrict, curItem.text);
291
+ if (originalString != curItem.text)
292
+ {
293
+ modified = true;
294
+ }
295
+ }
296
+ }
297
+ len = q.answers.length;
298
+ for (i = 0; i < len; i++)
299
+ {
300
+ curItem = q.answers[i];
301
+ if (curItem.hasOwnProperty('text'))
302
+ {
303
+ originalString = curItem.text;
304
+ curItem.text = removeRestrictedCharacters(restrict, curItem.text);
305
+ if (originalString != curItem.text)
306
+ {
307
+ modified = true;
308
+ }
309
+ }
310
+ }
311
+ return modified;
312
+ }
313
+ protected function removeRestrictedCharacters(restrictString:String, inputString:String):String
314
+ {
315
+ var negStr:String = '';
316
+ var posStr:String = '';
317
+ var negRegExpStr:String = '';
318
+ var posRegExpStr:String = '';
319
+ var testStr:String = restrictString.replace('\\^', '___');
320
+ var caretPos:int = testStr.indexOf('^');
321
+ testStr = testStr.replace('___', '\\^');
322
+ if (caretPos == 0)
323
+ {
324
+ negStr = testStr.substr(1);
325
+ }
326
+ else if (caretPos == -1)
327
+ {
328
+ posStr = testStr;
329
+ }
330
+ else
331
+ {
332
+ posStr = testStr.substring(0, caretPos);
333
+ negStr = testStr.substring(caretPos + 1);
334
+ }
335
+ if (posStr != '')
336
+ {
337
+ posRegExpStr = convertRestrictStringToRegExp(posStr);
338
+ inputString = filterStringWithRegExp(inputString, posRegExpStr, false);
339
+ }
340
+ if (negStr != '')
341
+ {
342
+ negRegExpStr = convertRestrictStringToRegExp(negStr);
343
+ inputString = filterStringWithRegExp(inputString, negRegExpStr, true);
344
+ }
345
+ return inputString;
346
+ }
347
+ protected function convertRestrictStringToRegExp(t:String):String
348
+ {
349
+ var filterString:String = '';
350
+ var unicode:RegExp = /\\u(\w\w\w\w)/;
351
+ var unicodeRange:RegExp = /\\u(\w\w\w\w)\-\\u(\w\w\w\w)/;
352
+ var upperCaseAlphas:RegExp = /([A-Z]-[A-Z])/;
353
+ var lowerCaseAlphas:RegExp = /([a-z]-[a-z])/;
354
+ var numbers:RegExp = /([0-9]-[0-9])/;
355
+ var backslash:RegExp = new RegExp("\\\\\\");
356
+ var hyphen:RegExp = new RegExp("\\\\-");
357
+ var caret:RegExp = new RegExp("\\\\^");
358
+ var pipe:RegExp = /\|/;
359
+ var leftBracket:RegExp = /\[/;
360
+ var rightBracket:RegExp = /\]/;
361
+ var dollar:RegExp = /\$/;
362
+ var period:RegExp = /\./;
363
+ var question:RegExp = /\?/;
364
+ var star:RegExp = /\*/;
365
+ var plus:RegExp = /\+/;
366
+ var leftParen:RegExp = /\(/;
367
+ var rightParen:RegExp = /\)/;
368
+ var a:Array
369
+ while (unicodeRange.test(t))
370
+ {
371
+ a = unicodeRange.exec(t);
372
+ filterString += "\\x{" + a[1] + "}-\\x{" + a[2] + "}";
373
+ t = t.replace(unicodeRange, '');
374
+ }
375
+ while (unicode.test(t))
376
+ {
377
+ a = unicode.exec(t);
378
+ filterString += "\\x{" + a[1] + "}";
379
+ t = t.replace(unicode, '');
380
+ }
381
+ if (upperCaseAlphas.test(t))
382
+ {
383
+ filterString += upperCaseAlphas.exec(t)[0];// processRange(t, upperCaseAlphas);
384
+ t = t.replace(upperCaseAlphas, '');
385
+ }
386
+ if (lowerCaseAlphas.test(t))
387
+ {
388
+ filterString += lowerCaseAlphas.exec(t)[0];//processRange(t, lowerCaseAlphas);
389
+ t = t.replace(lowerCaseAlphas, '');
390
+ }
391
+ if (numbers.test(t))
392
+ {
393
+ filterString += numbers.exec(t)[0];//processRange(t, numbers);
394
+ t = t.replace(numbers, '');
395
+ }
396
+ if (hyphen.test(t))
397
+ {
398
+ filterString += "\\-";
399
+ t = t.replace('\\\\-', '');
400
+ }
401
+ if (caret.test(t))
402
+ {
403
+ filterString += "\\^";
404
+ t = t.replace('\\\\^', '');
405
+ }
406
+ if (backslash.test(t))
407
+ {
408
+ filterString += "\\\\";
409
+ t = t.replace('\\\\\\\\', '');
410
+ }
411
+ if (leftBracket.test(t))
412
+ {
413
+ filterString += '\\[';
414
+ t = t.replace(leftBracket, '');
415
+ }
416
+ if (rightBracket.test(t))
417
+ {
418
+ filterString += '\\]';
419
+ t = t.replace(rightBracket, '');
420
+ }
421
+ if (dollar.test(t))
422
+ {
423
+ filterString += '\\$';
424
+ t = t.replace(dollar, '');
425
+ }
426
+ if (period.test(t))
427
+ {
428
+ filterString += '\\.';
429
+ t = t.replace(period, '');
430
+ }
431
+ if (question.test(t))
432
+ {
433
+ filterString += '\\?';
434
+ t = t.replace(question, '');
435
+ }
436
+ if (star.test(t))
437
+ {
438
+ filterString += '\\*';
439
+ t = t.replace(star, '');
440
+ }
441
+ if (plus.test(t))
442
+ {
443
+ filterString += '\\+';
444
+ t = t.replace(plus, '');
445
+ }
446
+ if (leftParen.test(t))
447
+ {
448
+ filterString += '\\(';
449
+ t = t.replace(leftParen, '');
450
+ }
451
+ if (rightParen.test(t))
452
+ {
453
+ filterString += '\\)';
454
+ t = t.replace(rightParen, '');
455
+ }
456
+ if (pipe.test(t))
457
+ {
458
+ filterString += '\\|';
459
+ t = t.replace(pipe, '');
460
+ }
461
+ //Assume remaining characters are not special.
462
+ filterString += t;
463
+ return filterString;
464
+ }
465
+ protected function filterStringWithRegExp(s:String, r:String, negate:Boolean):String
466
+ {
467
+ var out:String = '';
468
+ if (negate)
469
+ {
470
+ out = s.replace(new RegExp('[' + r + ']', 'g'), '');
471
+ }
472
+ else
473
+ {
474
+ out = s.replace(new RegExp('(?![' + r + ']).', 'g'), '');
475
+ }
476
+ return out;
477
+ }
478
+
479
+ public function onSaveClicked(mode:String = 'save'):void
480
+ {
481
+ ExternalInterface.call("__materia_flash_save", instanceTitle, questionSet, questionSetVersion);
482
+ // or cancel it:
483
+ // ExternalInterface.call("__materia_flash_cancelSave", 'Save Canceled');
484
+ }
485
+
486
+ public function onSaveComplete(title:String, widget:Object, qset:Object, version:String):void
487
+ {
488
+ instanceTitle = title;
489
+ this.widget = widget;
490
+ questionSetVersion = version;
491
+ }
492
+ // similar to code in MediaItem -> should both use the same function
493
+ public static function resolveSource(asset_id:String, type:String = 'notASwf!'):String
494
+ {
495
+ if(type == '.swf') // swfs will show preview images instead of playing the actual swf
496
+ {
497
+ return CreatorConfig.getKogneatoAssetPreviewLink(asset_id);
498
+ }
499
+
500
+ return CreatorConfig.getKogneatoAssetLink(asset_id);
501
+ }
502
+ ]]>
503
+ </mx:Script>
504
+ </mx:Application>
@@ -0,0 +1,45 @@
1
+ package materia
2
+ {
3
+ /**
4
+ * GlobalSettings hosts variables and constants that can be accessed from anywhere.
5
+ * This file us used for storing settings and preferences.
6
+ */
7
+ public class CreatorConfig
8
+ {
9
+ //--------------------------------------------------------------------------
10
+ //
11
+ // Class constants
12
+ //
13
+ //--------------------------------------------------------------------------
14
+ /**
15
+ * Used as the Max Lenght of all game titles
16
+ * */
17
+ public static const MAX_TITLE_LENGTH:int = 75;
18
+ /**
19
+ * The URL to kogneato.
20
+ */
21
+ public static var URL_WEB:String;
22
+ /**
23
+ * The Game Resource ID (Type of Widget) we're creating
24
+ */
25
+ public static var widget_id:int;
26
+ /**
27
+ * The Game Instance ID (Instance of Widget) we're editing
28
+ */
29
+ public static var inst_id:int;
30
+ /**
31
+ * Used to get assets.
32
+ */
33
+ public static var URL_GET_ASSET:String;
34
+
35
+ public static function getKogneatoAssetLink(id:String):String
36
+ {
37
+ return URL_GET_ASSET + id;
38
+ }
39
+ public static function getKogneatoAssetPreviewLink(id:String):String
40
+ {
41
+ return URL_GET_ASSET + id + '/thumbnail';
42
+ }
43
+ public function CreatorConfig(){}
44
+ }
45
+ }
@@ -0,0 +1,38 @@
1
+ package materia
2
+ {
3
+ import flash.events.Event;
4
+ public class CreatorEvents extends Event
5
+ {
6
+ public static const SAVE_GAME:String = "SAVE_GAME";
7
+ public static const REQUEST_QUESTION_IMPORT:String = "REQUEST_QUESTION_IMPORT";
8
+ public static const REQUEST_MEDIA_IMPORT:String = "REQUEST_MEDIA_IMPORT";
9
+ public static const IMPORT_COMPLETE:String = "IMPORT_COMPLETE";
10
+ public static const CLICK_SAVE:String = "CLICK_SAVE";
11
+ public static const CLICK_PUBLISH:String = "CLICK_PUBLISH";
12
+ public static const CLICK_PREVIEW:String = "CLICK_PREVIEW";
13
+ public static const CLICK_CANCEL:String = "CLICK_CANCEL";
14
+ public static const CLICK_SETTINGS:String = "CLICK_SETTINGS";
15
+ public static const SETTINGS_SAVED:String = "SETTINGS_SAVED";
16
+ public static const SETTINGS_CANCEL:String = "SETTINGS_CANCEL";
17
+ public static const AUTO_SAVE_SAVE:String = "AUTO_SAVE_SAVE";
18
+ public static const AUTO_SAVE_LOAD:String = "AUTO_SAVE_LOAD";
19
+ public static const ENABLE_SAVE:String = "ENABLE_SAVE";
20
+ public static const ENABLE_PUBLISH:String = "ENABLE_PUBLISH";
21
+ public static const ENABLE_PREVIEW:String = "ENABLE_PREVIEW";
22
+ public static const ENABLE_CANCEL:String = "ENABLE_CANCEL";
23
+ public static const ENABLE_IMPORT:String = "ENABLE_IMPORT";
24
+ public static const DISABLE_SAVE:String = "DISABLE_SAVE";
25
+ public static const DISABLE_PUBLISH:String = "DISABLE_PUBLISH";
26
+ public static const DISABLE_PREVIEW:String = "DISABLE_PREVIEW";
27
+ public static const DISABLE_CANCEL:String = "DISABLE_CANCEL";
28
+ public static const DISABLE_IMPORT:String = "DISABLE_IMPORT";
29
+ public static const CREATION_COMPLETE:String = "CREATION_COMPLETE";
30
+ public static const GAME_ADDED:String = "GAME_ADDED";
31
+ public var data:*;
32
+ public function CreatorEvents(type:String, data:*=null, bubbles:Boolean=true, cancelable:Boolean=false)
33
+ {
34
+ super(type, bubbles, cancelable);
35
+ this.data = data;
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,35 @@
1
+ package materia
2
+ {
3
+ public class Dialog
4
+ {
5
+
6
+ public static const YESNO:int = 0;
7
+
8
+ public static const OKCANCEL:int = 1;
9
+
10
+ public static const OK:int = 2;
11
+
12
+ /**
13
+ * Shows a popup prompt with yes/no or ok/cancel
14
+ */
15
+ public static function show(type:int = Dialog.OKCANCEL, title:String = "Kogneato", msg:String = "", callback:Function = null, callbackArgs:Array = null):void
16
+ {
17
+ var button1:String = type == Dialog.YESNO ? "Yes" : "Ok";
18
+ var button2:String = type == Dialog.YESNO ? "No" : "Cancel";
19
+
20
+ var p:PopUpAlert = new PopUpAlert();
21
+ p.message = msg;
22
+ p.title = title;
23
+ if(callback != null)
24
+ {
25
+ p.addButtonWithCallback(button1, callback, false, callbackArgs);
26
+ if(type != Dialog.OK) p.addButton(button2, 0, true);
27
+ }
28
+ else
29
+ {
30
+ p.addButton(button1, 0, true);
31
+ }
32
+ p.show(CreatorBase.creatorInstance);
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,35 @@
1
+ package materia
2
+ {
3
+ import flash.events.MouseEvent;
4
+ import materia.toolTips.TipManager;
5
+ import mx.controls.Button;
6
+ import mx.managers.ToolTipManager;
7
+ public class MateriaButton extends Button
8
+ {
9
+ [Bindable]
10
+ [Inspectable(category="General", enumeration="above,below", defaultValue="above")]
11
+ public var toolTipOrientation:String = '';
12
+ [Bindable]
13
+ public var toolTipDisabledMessage:String = '';
14
+ public function MateriaButton()
15
+ {
16
+ super();
17
+ ToolTipManager.enabled = false;
18
+ addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver, false, 0, true);
19
+ addEventListener(MouseEvent.CLICK, handleClick, false, 0, true);
20
+ }
21
+ protected function handleClick(event:MouseEvent):void
22
+ {
23
+ TipManager.removeTip();
24
+ }
25
+ protected function handleMouseOver(event:MouseEvent):void
26
+ {
27
+ var tt:String = toolTip;
28
+ if(toolTipDisabledMessage && !enabled)
29
+ {
30
+ tt = toolTipDisabledMessage;
31
+ }
32
+ TipManager.showTip(this, tt, toolTipOrientation);
33
+ }
34
+ }
35
+ }