mako 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/mako +133 -0
- data/lib/mako/build.rb +336 -0
- data/lib/mako/data/flash_widget_dev_core/Dependencies.txt +10 -0
- data/lib/mako/data/flash_widget_dev_core/libs/Degrafa_.2.11.swc +0 -0
- data/lib/mako/data/flash_widget_dev_core/libs/KogneatoGraphics.swc +0 -0
- data/lib/mako/data/flash_widget_dev_core/libs/KogneatoSymbols.swc +0 -0
- data/lib/mako/data/flash_widget_dev_core/libs/flash.swc +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/images/RichTextEditor.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/ARLRDBD.TTF +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/FTD_____.TTF +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdana.ttf +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanab.ttf +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanai.ttf +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/fonts/verdanaz.ttf +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/DefaultError.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/barbgfill.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/barshadow.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/bold.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/bullets.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/center.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/close-x.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/fullscreenPopup_close.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc2.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/mc3.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/qa.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/gameTypeIcons/so.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/importIcon.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/italic.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/justify.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/kogLogo.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/left.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-href-disabled.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-href.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-pagelink-disabled.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-pagelink.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-delete.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-disabled.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip-edit.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/oml-tooltip.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/pencil.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/right.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/underline.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayButton.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPauseButton.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPauseButton_over.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPlayButton.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerPlayButton_over.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerSoundButton.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/images/videoPlayerSoundButton_over.png +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/styles/creatorStyle.css +57 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/styles/style.css +929 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/embeddedfonts.swf +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/helpBubble.swf +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/kogneatoSymbols.swf +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/assets/materia/swf/videobg.swf +0 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/LICENSE.txt +27 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/CubeRotate.as +48 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Distortion.as +168 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/DistortionConstants.as +16 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Door.as +57 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Flip.as +62 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Gate.as +57 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Pop.as +53 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/Push.as +48 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/SimpleDistortion.as +619 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/CubeRotateInstance.as +94 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/DistortBaseInstance.as +258 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/DoorInstance.as +116 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/FlipInstance.as +79 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/GateInstance.as +163 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/PopInstance.as +91 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/mxeffects/effectClasses/PushInstance.as +76 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/DisplayObjectBounds.as +64 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/DisplayObjectBoundsUtil.as +42 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/ac/util/SimpleDisplayObjectBoundsUtil.as +60 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/HMAC.as +108 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/MD5.as +250 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/MD5Stream.as +343 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA1.as +250 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA224.as +226 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/SHA256.as +229 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/crypto/WSSEUsernameToken.as +100 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFade.as +107 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFadeInstance.as +178 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/effects/SaturationFadePopUpBlocker.as +88 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/errors/IllegalStateError.as +57 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Address.as +41 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Email.as +34 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/Phone.as +34 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/VCard.as +47 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/fileformats/vcard/VCardParser.as +234 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/BitString.as +34 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/JPGEncoder.as +584 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/images/PNGEncoder.as +133 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/DynamicURLLoader.as +48 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/IURIResolver.as +70 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/MimeTypeMap.as +192 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/URI.as +2139 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/URIEncodingBitmap.as +122 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/net/proxies/RFC2817Socket.as +179 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Database.as +55 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Definition.as +59 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Dict.as +322 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/DictionaryServer.as +50 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/MatchStrategy.as +55 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/Response.as +59 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/ConnectedEvent.as +44 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DatabaseEvent.as +54 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DefinitionEvent.as +55 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DefinitionHeaderEvent.as +55 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DictionaryServerEvent.as +55 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/DisconnectedEvent.as +44 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/ErrorEvent.as +64 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/MatchEvent.as +54 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/MatchStrategiesEvent.as +56 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/events/NoMatchEvent.as +44 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/util/CompleteResponseEvent.as +55 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/protocols/dict/util/SocketHelper.as +70 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSON.as +76 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONDecoder.as +303 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONEncoder.as +277 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONParseError.as +79 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONToken.as +79 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONTokenType.as +49 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/serialization/json/JSONTokenizer.as +605 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/ArrayUtil.as +166 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/DateUtil.as +657 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/DictionaryUtil.as +73 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/IntUtil.as +85 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/NumberFormatter.as +63 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/StringUtil.as +220 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/utils/XMLUtil.as +148 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/ServiceBase.as +39 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/URLLoaderBase.as +93 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/adobe/webapis/events/ServiceEvent.as +67 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/geom/ColorMatrix.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTween.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTweenTimeline.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/GTweener.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Back.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Bounce.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Circular.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Cubic.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Elastic.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Exponential.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Linear.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quadratic.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quartic.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Quintic.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/easing/Sine.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/AutoHidePlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/BlurPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/ColorAdjustPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/ColorTransformPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/CurrentFramePlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/IGTweenPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/MatrixPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/MotionBlurPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SmartRotationPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SnappingPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/motion/plugins/SoundTransformPlugin.as +1 -0
- data/lib/mako/data/flash_widget_dev_core/src/com/gskinner/utils/SWFBridgeAS3.as +83 -0
- data/lib/mako/data/flash_widget_dev_core/src/etc/GUID.as +82 -0
- data/lib/mako/data/flash_widget_dev_core/src/etc/MathExt.as +114 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/OverwriteManager.as +143 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/TweenFilterLite.as +502 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/TweenLite.as +512 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/TweenMax.as +987 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Back.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Bounce.as +22 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Circ.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Cubic.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Elastic.as +27 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Expo.as +16 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Linear.as +16 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quad.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quart.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Quint.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Sine.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/Strong.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/easing/easing_readme.txt +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/events/TweenEvent.as +26 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/BevelFilterVars.as +63 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/BlurFilterVars.as +42 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/ColorMatrixFilterVars.as +86 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/DropShadowFilterVars.as +66 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/GlowFilterVars.as +57 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenFilterLiteVars.as +93 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenLiteVars.as +269 -0
- data/lib/mako/data/flash_widget_dev_core/src/gs/utils/tween/TweenMaxVars.as +103 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenEvent.as +17 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenObject.as +27 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/TweenSingleton.as +86 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/Constant.as +7 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/FastSlow.as +7 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/FastSlowFast.as +8 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/Shake.as +12 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/SlowFast.as +7 -0
- data/lib/mako/data/flash_widget_dev_core/src/it/animation/methods/SlowFastSlow.as +8 -0
- data/lib/mako/data/flash_widget_dev_core/src/jac/image/ImageUtils.as +173 -0
- data/lib/mako/data/flash_widget_dev_core/src/jac/image/ResizeStyle.as +52 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorBase.mxml +504 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorConfig.as +45 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/CreatorEvents.as +38 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/Dialog.as +35 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/MateriaButton.as +35 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/PopUpAlert.mxml +271 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/GradientBackground.as +41 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/PercentField.mxml +104 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/ScrollableSizableImage.mxml +654 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/TextAreaWithDefaultText.mxml +94 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/TextInputWithDefaultText.mxml +94 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/VertCenterTextRenderer.mxml +37 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/ImportEvent.as +22 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/itemRenderers/CheckBoxColumn.mxml +23 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionDetails.mxml +68 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionDisplay.mxml +38 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionsDataGrid.mxml +247 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/importer/questions/QuestionsDataGridEvent.as +20 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/QuestionAnswerColumn.as +13 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/QuestionAnswerDataGrid.mxml +692 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/TextInputItem.mxml +584 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/questionAnswerDataGrid/TextInputObject.as +28 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/toolTips/KogneatoToolTip.as +196 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/components/toolTips/TipManager.as +150 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpBubble.mxml +245 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpDot.mxml +21 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpManager.as +92 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/help/HelpObject.as +33 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/help/IHelpGuided.as +7 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/media/ImageCacherImage.mxml +56 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/media/MateriaUploader.as +61 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/Question.as +386 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/QuestionGroup.as +313 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/questionStorage/QuestionSet.as +21 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/toolTips/KogneatoToolTip.as +196 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/toolTips/TipManager.as +150 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/utils/CommonUtils.as +186 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/utils/DateUtils.as +273 -0
- data/lib/mako/data/flash_widget_dev_core/src/materia/utils/ImageCacher.as +93 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/arrays/Randomize.as +19 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/arrays/SimpleClone.as +32 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/Color.as +102 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/Draw.as +65 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/lines/Dashed.as +48 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/lines/Dotted.as +83 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/Check.as +27 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/Rect.as +12 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectBevel.as +35 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectBorder.as +39 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectRound.as +33 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/RectRoundBorder.as +62 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/TriangleEquilateral.as +25 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/draw/shapes/X.as +28 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/errors/ScoringError.as +10 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/errors/StorageError.as +10 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/events/ButtonEvent.as +25 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/events/PayloadEvent.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/events/StandardEvent.as +26 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/Question.as +72 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/QuestionGroup.as +87 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/QuestionSet.as +35 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/WidgetSettings.as +14 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/coms/ServerEvents.as +17 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/coms/ServerMessageEvent.as +31 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/logging/Log.as +92 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/scoring/Scoring.as +87 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/storage/StorageManager.as +91 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/common/storage/StorageTable.as +72 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/gameServ/engines/EngineCore.as +222 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/geom/Dimension.as +76 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/Respondus.as +612 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusAnswer.as +11 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusError.as +18 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusQuestion.as +43 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/respondus/RespondusQuiz.as +68 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/AlertWindow.as +182 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/BlueButton.as +102 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Button.as +88 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Button_base.as +168 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Component.as +98 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ContentBlocker.as +38 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/FlexUIScaler.as +59 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/FormInput.as +191 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/GrabZoomClip.as +305 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/HelpLayer.as +55 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Label.as +25 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/List.as +62 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/List_Base.as +644 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProcessingBar.as +112 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProgressBar.as +35 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ProgressBar_base.as +69 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollBar.as +163 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollBar_base.as +378 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollClip.as +468 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollText.as +29 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ScrollText_base.as +295 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/SimpleScrollBar.as +247 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StageRef.as +34 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StorageTank.as +233 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/StorageTankHorizontal.as +109 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/ToolTip.as +930 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/TweeningDragDropBankList.as +503 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Window.as +144 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/Window_base.as +385 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/CenterScale.as +27 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/WindowManager.as +163 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/ui/layout/WindowStage.as +96 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/util/BitField.as +99 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/util/ObjPeek.as +148 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/util/Objects.as +49 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/util/Printer.as +548 -0
- data/lib/mako/data/flash_widget_dev_core/src/nm/util/StringUtil.as +12 -0
- data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/FaultEvent.as +37 -0
- data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingCall.as +211 -0
- data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingConnection.as +41 -0
- data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/RemotingService.as +214 -0
- data/lib/mako/data/flash_widget_dev_core/src/org/rubyamf/remoting/ssr/ResultEvent.as +36 -0
- data/lib/mako/data/flash_widget_dev_core/src/sandy/util/DistortImage.as +281 -0
- data/lib/mako/data/flash_widget_dev_core/src/sandy/util/SandyPoint.as +29 -0
- data/lib/mako/data/flash_widget_dev_core/src/sandy/util/Triangle.as +32 -0
- data/lib/mako/data/html/thistest.html +0 -0
- data/lib/mako/data/template_creator/src/Creator.mxml +138 -0
- data/lib/mako/data/template_creator/src/assets/images/RichTextEditor.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/DefaultError.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/barbgfill.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/barshadow.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/bold.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/bullets.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/center.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/close-x.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/fullscreenPopup_close.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/importIcon.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/italic.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/justify.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/left.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/oml-href-disabled.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/oml-href.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/oml-pagelink-disabled.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/oml-pagelink.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-delete.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-disabled.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip-edit.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/oml-tooltip.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/pencil.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/right.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/underline.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayButton.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPauseButton.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPauseButton_over.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPlayButton.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerPlayButton_over.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerSoundButton.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/images/videoPlayerSoundButton_over.png +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/styles/creatorStyle.css +63 -0
- data/lib/mako/data/template_creator/src/assets/materia/styles/style.css +1127 -0
- data/lib/mako/data/template_creator/src/assets/materia/swf/embeddedfonts.swf +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/swf/helpBubble.swf +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/swf/kogneatoSymbols.swf +0 -0
- data/lib/mako/data/template_creator/src/assets/materia/swf/videobg.swf +0 -0
- data/lib/mako/data/template_creator/src/components/SmallRichTextEditor.mxml +678 -0
- data/lib/mako/data/template_creator/src/components/SmallRichTextEditorToolbar.mxml +133 -0
- data/lib/mako/data/templates/html/README.md +11 -0
- data/lib/mako/data/templates/html/_creator/build.yaml +12 -0
- data/lib/mako/data/templates/html/_creator/creator.html +19 -0
- data/lib/mako/data/templates/html/_creator/css/creator.less +29 -0
- data/lib/mako/data/templates/html/_creator/js/creator.coffee +122 -0
- data/lib/mako/data/templates/html/_creator/test.html +0 -0
- data/lib/mako/data/templates/html/_engine/build.yaml +12 -0
- data/lib/mako/data/templates/html/_engine/css/widget.scss +18 -0
- data/lib/mako/data/templates/html/_engine/js/widget.coffee +143 -0
- data/lib/mako/data/templates/html/_engine/widget.html +21 -0
- data/lib/mako/data/templates/html/_icons/icon-275.png +0 -0
- data/lib/mako/data/templates/html/_icons/icon-394.png +0 -0
- data/lib/mako/data/templates/html/_icons/icon-60.png +0 -0
- data/lib/mako/data/templates/html/_icons/icon-92.png +0 -0
- data/lib/mako/data/templates/html/_score/score_module.php +48 -0
- data/lib/mako/data/templates/html/_score/test_score_module.php +157 -0
- data/lib/mako/data/templates/html/_screen-shots/1-thumb.png +0 -0
- data/lib/mako/data/templates/html/_screen-shots/1.png +0 -0
- data/lib/mako/data/templates/html/_screen-shots/2-thumb.png +0 -0
- data/lib/mako/data/templates/html/_screen-shots/2.png +0 -0
- data/lib/mako/data/templates/html/_screen-shots/3-thumb.png +0 -0
- data/lib/mako/data/templates/html/_screen-shots/3.png +0 -0
- data/lib/mako/data/templates/html/build.yaml +4 -0
- data/lib/mako/data/templates/html/demo.yaml +7 -0
- data/lib/mako/data/templates/html/install.yaml +94 -0
- data/lib/mako/path.rb +48 -0
- data/lib/mako/scaffold.rb +69 -0
- metadata +597 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
package materia.help
|
|
2
|
+
{
|
|
3
|
+
import flash.display.DisplayObject;
|
|
4
|
+
public class HelpObject
|
|
5
|
+
{
|
|
6
|
+
public static const H_ALIGN_AUTO:int = -1;
|
|
7
|
+
public static const H_ALIGN_LEFT:int = 0;
|
|
8
|
+
public static const H_ALIGN_RIGHT:int = 1;
|
|
9
|
+
public static const V_ALIGN_AUTO:int = -1;
|
|
10
|
+
public static const V_ALIGN_TOP:int = 0;
|
|
11
|
+
public static const V_ALIGN_BOTTOM:int = 1;
|
|
12
|
+
public static const V_ALIGN_CENTER:int = 2;
|
|
13
|
+
private const DEFAULT_WIDTH:int = 300;
|
|
14
|
+
public var title:String;
|
|
15
|
+
public var message:String;
|
|
16
|
+
public var targetComponent:DisplayObject;
|
|
17
|
+
public var horizontalAlign:int;
|
|
18
|
+
public var verticalAlign:int;
|
|
19
|
+
public var width:Number;
|
|
20
|
+
public var showArrow:Boolean;
|
|
21
|
+
public function HelpObject(targetComponent:DisplayObject, title:String, message:String,
|
|
22
|
+
horizontalAlign:int = -1, verticalAlign:int = -1, width:Number = -1, showArrow:Boolean = true)
|
|
23
|
+
{
|
|
24
|
+
this.targetComponent = targetComponent;
|
|
25
|
+
this.title = title;
|
|
26
|
+
this.message = message;
|
|
27
|
+
this.horizontalAlign = horizontalAlign;
|
|
28
|
+
this.verticalAlign = verticalAlign;
|
|
29
|
+
this.width = width == -1? DEFAULT_WIDTH:width;
|
|
30
|
+
this.showArrow = showArrow;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<mx:Image xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="{creationComplete()}">
|
|
3
|
+
<mx:Script>
|
|
4
|
+
<![CDATA[
|
|
5
|
+
import materia.utils.ImageCacher;
|
|
6
|
+
/**
|
|
7
|
+
* This is an image component that uses ImageCacher to load images.
|
|
8
|
+
* Use it like a normal image component, but use imageSource instead of source.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
protected var _imageSource:String = "";
|
|
13
|
+
|
|
14
|
+
protected var _isCreationComplete:Boolean = false;
|
|
15
|
+
|
|
16
|
+
[Bindable]
|
|
17
|
+
public function set imageSource(s:String):void
|
|
18
|
+
{
|
|
19
|
+
setImageSource(s);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// NOTE: strage bug, there are times when the setter for image source doesnt work right
|
|
23
|
+
// this function is used in the flashcards creator
|
|
24
|
+
public function setImageSource(s:String):void
|
|
25
|
+
{
|
|
26
|
+
_imageSource = s;
|
|
27
|
+
|
|
28
|
+
if(_isCreationComplete)
|
|
29
|
+
{
|
|
30
|
+
loadTheImage();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
protected function loadTheImage():void
|
|
35
|
+
{
|
|
36
|
+
ImageCacher.loadImage(this, _imageSource);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public function get imageSource():String
|
|
40
|
+
{
|
|
41
|
+
return _imageSource;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
protected function creationComplete():void
|
|
45
|
+
{
|
|
46
|
+
_isCreationComplete = true;
|
|
47
|
+
|
|
48
|
+
if(_imageSource != "")
|
|
49
|
+
{
|
|
50
|
+
loadTheImage();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
]]>
|
|
55
|
+
</mx:Script>
|
|
56
|
+
</mx:Image>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
package materia.media
|
|
2
|
+
{
|
|
3
|
+
import flash.events.Event;
|
|
4
|
+
import flash.net.FileReference;
|
|
5
|
+
import flash.net.FileReferenceList;
|
|
6
|
+
|
|
7
|
+
import materia.CreatorConfig;
|
|
8
|
+
import materia.PopUpAlert;
|
|
9
|
+
|
|
10
|
+
import mx.events.CloseEvent;
|
|
11
|
+
import mx.managers.PopUpManager;
|
|
12
|
+
import mx.rpc.events.ResultEvent;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* This is a static class to handle uploading files!
|
|
16
|
+
*
|
|
17
|
+
* It is currently going to be used by the MediaScreen, and the MediaScreenGameCreatorPopup
|
|
18
|
+
*
|
|
19
|
+
* Note: this will depend on the screens to not ask to upload more in the middle of an upload.
|
|
20
|
+
* */
|
|
21
|
+
public class MateriaUploader
|
|
22
|
+
{
|
|
23
|
+
|
|
24
|
+
protected static var _files:Array; // an array of FileRefences
|
|
25
|
+
protected static var _parentStage:*; // a place to put popups
|
|
26
|
+
protected static var _callbackFunction:Function // callback function
|
|
27
|
+
// funciton will look like this:
|
|
28
|
+
// fileUploadComplete(sucess:Boolean, assetidsList:Array, sourcesList:Array):void
|
|
29
|
+
|
|
30
|
+
protected static var _currentUploadIndex:int;
|
|
31
|
+
protected static var _currentFileReference:FileReference;
|
|
32
|
+
|
|
33
|
+
protected static const SNAP_SHOT_MAX_SIZE:Number = 250;
|
|
34
|
+
|
|
35
|
+
protected static var _sourcesList:Array; // array of urls to open the uploaded images at
|
|
36
|
+
protected static var _assetIdsList:Array; // array of assetids -> parallel to _sourcesList
|
|
37
|
+
|
|
38
|
+
protected static var _replacedFileData:Object; // file data for a replaced file, if we are replacing
|
|
39
|
+
|
|
40
|
+
protected static var _isReplacingAFile:Boolean = false; // true if we are replacing a file
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
protected static function cleanUp():void
|
|
47
|
+
{
|
|
48
|
+
//trace(TRACE_STRING + "::cleanUp");
|
|
49
|
+
|
|
50
|
+
_files = null;
|
|
51
|
+
_parentStage = null;
|
|
52
|
+
_callbackFunction = null;
|
|
53
|
+
_currentFileReference = null;
|
|
54
|
+
_sourcesList = null;
|
|
55
|
+
_assetIdsList = null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
package materia.questionStorage
|
|
2
|
+
{
|
|
3
|
+
import materia.utils.CommonUtils;
|
|
4
|
+
import mx.utils.ObjectUtil;
|
|
5
|
+
public class Question
|
|
6
|
+
{
|
|
7
|
+
public static const MC_QUESTION:String = "MC";
|
|
8
|
+
public static const QA_QUESTION:String = "QA";
|
|
9
|
+
public static const SO_QUESTION:String = "SO"; // Short answer type. Are we using this?
|
|
10
|
+
public var answers:Array;
|
|
11
|
+
public var id:Number;
|
|
12
|
+
public var questions:Array;
|
|
13
|
+
public var name:String;
|
|
14
|
+
public var options:Object;
|
|
15
|
+
public var type:String;
|
|
16
|
+
public var value:String;
|
|
17
|
+
public var assets:Array;
|
|
18
|
+
public function Question(type:String = "MC", options:Object = null, id:Number = 0, question:String = null, answer:String = null)
|
|
19
|
+
{
|
|
20
|
+
this.type = type;
|
|
21
|
+
this.id = id;
|
|
22
|
+
questions = new Array();
|
|
23
|
+
answers = new Array();
|
|
24
|
+
this.options = options == null? new Object : options;
|
|
25
|
+
if(question != null)
|
|
26
|
+
{
|
|
27
|
+
addQuestion(question);
|
|
28
|
+
}
|
|
29
|
+
if(answer != null)
|
|
30
|
+
{
|
|
31
|
+
addAnswer(answer);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
// convert objects to arrays
|
|
35
|
+
public static function toArray(obj:Object): Array
|
|
36
|
+
{
|
|
37
|
+
if (obj == null)
|
|
38
|
+
{
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
else
|
|
42
|
+
{
|
|
43
|
+
var ret:Array = [];
|
|
44
|
+
for each (var prop:Object in obj)
|
|
45
|
+
{
|
|
46
|
+
ret.push(prop);
|
|
47
|
+
}
|
|
48
|
+
return ret;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
public static function convertObject(obj:Object):Question
|
|
52
|
+
{
|
|
53
|
+
var q:Question = new Question();
|
|
54
|
+
q.questions = obj["questions"] is Array ? obj['questions'] : Question.toArray(obj['questions']) ;
|
|
55
|
+
q.answers = obj["answers"] is Array ? obj['answers'] : Question.toArray(obj['answers']) ;
|
|
56
|
+
//trace(q.answers.length)
|
|
57
|
+
if(obj.hasOwnProperty("name")) q.name = obj["name"];
|
|
58
|
+
q.id = obj["id"];
|
|
59
|
+
// There was some issues with the options coming in as Arrays vs Objects.
|
|
60
|
+
// This will make sure we have objects.
|
|
61
|
+
q.options = CommonUtils.convertArrayToObject(obj["options"]);
|
|
62
|
+
// questions and answers can also have answers with options -> make em objects
|
|
63
|
+
var i:int;
|
|
64
|
+
if(q.questions != null)
|
|
65
|
+
{
|
|
66
|
+
for (i = 0; i < q.questions.length; i++)
|
|
67
|
+
{
|
|
68
|
+
q.questions[i]["options"] = CommonUtils.convertArrayToObject(q.questions[i]["options"]);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if(q.answers != null)
|
|
72
|
+
{
|
|
73
|
+
for (i = 0; i < q.answers.length; i++)
|
|
74
|
+
{
|
|
75
|
+
q.answers[i]["options"] = CommonUtils.convertArrayToObject(q.answers[i]["options"]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
q.type = obj["type"];
|
|
79
|
+
q.id = obj["id"];
|
|
80
|
+
q.assets = [];
|
|
81
|
+
if( obj["assets"] )
|
|
82
|
+
{
|
|
83
|
+
for( i = 0; i< obj["assets"].length; i++)
|
|
84
|
+
{
|
|
85
|
+
q.assets.push(obj["assets"][i]);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return q;
|
|
89
|
+
}
|
|
90
|
+
public function addAItem(text:String, value:String, options:Object = null):void
|
|
91
|
+
{
|
|
92
|
+
if (options == null)
|
|
93
|
+
options = new Object();
|
|
94
|
+
answers.push(constructNewItem(text, options, value));
|
|
95
|
+
}
|
|
96
|
+
public function addAnswer(text:String, value:String = "100", options:Object = null):void
|
|
97
|
+
{
|
|
98
|
+
if (answers == null)
|
|
99
|
+
answers = new Array();
|
|
100
|
+
answers.push(constructNewItem(text, options, value));
|
|
101
|
+
}
|
|
102
|
+
public function addOption(name:String, value:*):void
|
|
103
|
+
{
|
|
104
|
+
if (options == null)
|
|
105
|
+
options = new Object;
|
|
106
|
+
options[name] = value;
|
|
107
|
+
}
|
|
108
|
+
public function addQItem(text:String, options:Object = null):void
|
|
109
|
+
{
|
|
110
|
+
if (options == null)
|
|
111
|
+
options = new Object();
|
|
112
|
+
questions.push(constructNewItem(text, options));
|
|
113
|
+
}
|
|
114
|
+
public function addQuestion(text:String):void
|
|
115
|
+
{
|
|
116
|
+
addQItem(text);
|
|
117
|
+
}
|
|
118
|
+
public function addText(text:String):void
|
|
119
|
+
{
|
|
120
|
+
addQItem(text);
|
|
121
|
+
}
|
|
122
|
+
public function clone():Question
|
|
123
|
+
{
|
|
124
|
+
var clone:Question = new Question(type, null, id);
|
|
125
|
+
//Copy options
|
|
126
|
+
for (var i:String in options) { clone.options[i] = ObjectUtil.copy(options[i]); }
|
|
127
|
+
//Copy Answers
|
|
128
|
+
if(answers && answers.length)
|
|
129
|
+
{
|
|
130
|
+
for (i in answers)
|
|
131
|
+
{
|
|
132
|
+
clone.answers[i] = ObjectUtil.copy(answers[i]);
|
|
133
|
+
if(clone.answers[i].value == null) clone.answers[i].value = 0;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else { clone.answers = new Array(); }
|
|
137
|
+
//Copy Questions
|
|
138
|
+
if(questions.length) { for (i in questions) { clone.questions[i] = ObjectUtil.copy(questions[i]); } }
|
|
139
|
+
else { clone.questions = new Array(); }
|
|
140
|
+
return clone;
|
|
141
|
+
}
|
|
142
|
+
public function convertToObject():Object
|
|
143
|
+
{
|
|
144
|
+
var o:Object = new Object();
|
|
145
|
+
o["questions"] = questions;
|
|
146
|
+
o["answers"] = answers;
|
|
147
|
+
o["name"] = name;
|
|
148
|
+
o["options"] = options;
|
|
149
|
+
o["type"] = type;
|
|
150
|
+
o["id"] = id;
|
|
151
|
+
o["assets"] = assets;
|
|
152
|
+
return o;
|
|
153
|
+
}
|
|
154
|
+
public function get correctAnswer():String
|
|
155
|
+
{
|
|
156
|
+
if(answers == null || answers.length == 0)
|
|
157
|
+
{
|
|
158
|
+
return "";
|
|
159
|
+
}
|
|
160
|
+
var j:int = 0;
|
|
161
|
+
for (var i:int = 1; i < answers.length; i++)
|
|
162
|
+
{
|
|
163
|
+
if (answers[i].value != "")
|
|
164
|
+
{
|
|
165
|
+
if (Number(answers[i].value) > Number(answers[j].value))
|
|
166
|
+
j = i;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return answers[j].text;
|
|
170
|
+
}
|
|
171
|
+
// this should only be used for qa type questions
|
|
172
|
+
public function getAnswer():String
|
|
173
|
+
{
|
|
174
|
+
if(this.hasOwnProperty("answers") && answers != null && answers.length) { return answers[0].text; }
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
public function getOption(name:String):String
|
|
178
|
+
{
|
|
179
|
+
if (options == null)
|
|
180
|
+
return "";
|
|
181
|
+
else if (options.hasOwnProperty(name))
|
|
182
|
+
return options[name];
|
|
183
|
+
else
|
|
184
|
+
return "";
|
|
185
|
+
}
|
|
186
|
+
public function getQuestion():String
|
|
187
|
+
{
|
|
188
|
+
if (questions.length)
|
|
189
|
+
{
|
|
190
|
+
return questions[0].text;
|
|
191
|
+
}
|
|
192
|
+
else
|
|
193
|
+
{
|
|
194
|
+
return "";
|
|
195
|
+
}
|
|
196
|
+
return this.question;
|
|
197
|
+
}
|
|
198
|
+
public function get hint():String
|
|
199
|
+
{
|
|
200
|
+
return getOption("hint");
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Compare 2 questions, but don't worry about comparing the options.
|
|
204
|
+
* This is to see if question has changed to the point where it needs a new QID.
|
|
205
|
+
* The options are added with not just the QID, so don't compare options in this function.
|
|
206
|
+
* */
|
|
207
|
+
public function isSameQIDQuestion(otherQuestion:Question):Boolean
|
|
208
|
+
{
|
|
209
|
+
this.makeStandardQuestionFormat();
|
|
210
|
+
otherQuestion.makeStandardQuestionFormat();
|
|
211
|
+
var q1:Object = this.convertToObject();
|
|
212
|
+
var q2:Object = otherQuestion.convertToObject();
|
|
213
|
+
q1.options = new Object();
|
|
214
|
+
q2.options = new Object();
|
|
215
|
+
return (ObjectUtil.compare(q1, q2) == 0) // when the compare returns 0, they are the same
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Returns true if the 2 questions are the same. The same content/organization/ options.
|
|
219
|
+
* Set compareQIDs to true if we want to compare QIDs.
|
|
220
|
+
* TODO: not sure if we would ever really not want to also compare qids
|
|
221
|
+
*/
|
|
222
|
+
public function isSameQuestion(otherQuestion:Question, compareQIDs:Boolean = false):Boolean
|
|
223
|
+
{
|
|
224
|
+
// make them objects so we can compare them with ObjectUtil
|
|
225
|
+
// Note: is this hacky / bad to do?
|
|
226
|
+
this.makeStandardQuestionFormat();
|
|
227
|
+
otherQuestion.makeStandardQuestionFormat();
|
|
228
|
+
var q1:Object = this.convertToObject();
|
|
229
|
+
var q2:Object = otherQuestion.convertToObject();
|
|
230
|
+
var tmpQ1QID:int = q1["id"];
|
|
231
|
+
var tmpQ2QID:int = q2["id"];
|
|
232
|
+
if (compareQIDs == false) // we wont worry about QIDs in the comparison
|
|
233
|
+
{
|
|
234
|
+
q1["id"] = 0;
|
|
235
|
+
q2["id"] = 0;
|
|
236
|
+
}
|
|
237
|
+
var same:Boolean = (ObjectUtil.compare(q1, q2) == 0); // when the compare returns 0, they are the same
|
|
238
|
+
q1["id"] = tmpQ1QID;
|
|
239
|
+
q2["id"] = tmpQ2QID;
|
|
240
|
+
return same;
|
|
241
|
+
}
|
|
242
|
+
public function get question():String
|
|
243
|
+
{
|
|
244
|
+
return getQuestion();
|
|
245
|
+
}
|
|
246
|
+
public function set question(val:String):void
|
|
247
|
+
{
|
|
248
|
+
setQuestion(val);
|
|
249
|
+
}
|
|
250
|
+
public function get answer():String
|
|
251
|
+
{
|
|
252
|
+
return getAnswer();
|
|
253
|
+
}
|
|
254
|
+
public function set answer(val:String):void
|
|
255
|
+
{
|
|
256
|
+
setAnswer(val);
|
|
257
|
+
}
|
|
258
|
+
public function setAnswer(s:String):void
|
|
259
|
+
{
|
|
260
|
+
if(answers == null) addAnswer(s, '100', null);
|
|
261
|
+
answers[0].text = s;
|
|
262
|
+
}
|
|
263
|
+
public function setQuestion(s:String):void
|
|
264
|
+
{
|
|
265
|
+
if(questions[0] == null) questions.push(constructNewItem(s, null));
|
|
266
|
+
else questions[0].text = s;
|
|
267
|
+
}
|
|
268
|
+
protected function convertToStringOptions(obj:Object):void
|
|
269
|
+
{
|
|
270
|
+
for (var s:String in obj)
|
|
271
|
+
{
|
|
272
|
+
obj[s] = String(obj[s]);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Make it a standard format so we can easily compare questions.
|
|
277
|
+
* I was comparing questions with identical content, but they were object comparing as different.
|
|
278
|
+
*
|
|
279
|
+
* */
|
|
280
|
+
protected function makeStandardQuestionFormat():void
|
|
281
|
+
{
|
|
282
|
+
if (options == null)
|
|
283
|
+
{
|
|
284
|
+
options = new Object();
|
|
285
|
+
}
|
|
286
|
+
else
|
|
287
|
+
{
|
|
288
|
+
// HACKE CODE?
|
|
289
|
+
convertToStringOptions(options);
|
|
290
|
+
// END HACK CODE
|
|
291
|
+
}
|
|
292
|
+
if (name == null)
|
|
293
|
+
name = "";
|
|
294
|
+
var i:int;
|
|
295
|
+
if(questions != null)
|
|
296
|
+
{
|
|
297
|
+
for (i = 0; i < questions.length; i++)
|
|
298
|
+
{
|
|
299
|
+
if (questions[i].value == null) // some questions have values?
|
|
300
|
+
{
|
|
301
|
+
questions[i].value = "";
|
|
302
|
+
}
|
|
303
|
+
questions[i].value = String(questions[i].value); // values could be numbers, make them strings
|
|
304
|
+
if (questions[i].options == null)
|
|
305
|
+
{
|
|
306
|
+
questions[i].options = new Object();
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
if(this.hasOwnProperty("answers") && answers != null)
|
|
311
|
+
{
|
|
312
|
+
for (i = 0; i < answers.length; i++)
|
|
313
|
+
{
|
|
314
|
+
answers[i].id = 0; // we are not concerned with ids, haha
|
|
315
|
+
if (answers[i].options == null) // some questions have values?
|
|
316
|
+
{
|
|
317
|
+
answers[i].options = new Object();
|
|
318
|
+
}
|
|
319
|
+
answers[i].value = String(answers[i].value); // values could be numbers, make them strings
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
private function constructNewItem(text:String, options:Object, value:String = ""):Object
|
|
324
|
+
{
|
|
325
|
+
var newItem:Object = new Object();
|
|
326
|
+
newItem.options = new Object();
|
|
327
|
+
for (var i:String in options)
|
|
328
|
+
newItem.options[i] = options[i];
|
|
329
|
+
newItem.text = text;
|
|
330
|
+
newItem.value = value;
|
|
331
|
+
return newItem;
|
|
332
|
+
}
|
|
333
|
+
public function toString():String
|
|
334
|
+
{
|
|
335
|
+
var str:String = '['+type + ' Question]: ' + (questions?questions.length+"":'') + "q, " + (answers?answers.length+"":'') + "a Question: '" + (questions[0]?questions[0].text:'') + "'";
|
|
336
|
+
for(var i:* in options)
|
|
337
|
+
{
|
|
338
|
+
str += "\n Q Option: '" + i + "' = '"+ options[i] + "'"
|
|
339
|
+
}
|
|
340
|
+
return str
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Given TextInput's ItemRenderer errorType, determine if field is valid
|
|
344
|
+
* Override method in extended widget class to error check additional column types
|
|
345
|
+
**/
|
|
346
|
+
public function valid(type:String=""):Boolean
|
|
347
|
+
{
|
|
348
|
+
switch(type)
|
|
349
|
+
{
|
|
350
|
+
case 'question': return validQuestion();
|
|
351
|
+
case 'answer' : return validAnswer();
|
|
352
|
+
default : return validQuestion() && validAnswer();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Override in extended widget class for more comprehensive error checking
|
|
357
|
+
* Default: valid answer cannot be empty
|
|
358
|
+
**/
|
|
359
|
+
public function validAnswer():Boolean
|
|
360
|
+
{
|
|
361
|
+
return !empty(answer);
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Override in extended widget class for more comprehensive error checking
|
|
365
|
+
* Default: valid question cannot be empty
|
|
366
|
+
**/
|
|
367
|
+
public function validQuestion():Boolean
|
|
368
|
+
{
|
|
369
|
+
return !empty(question);
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Check if string is empty
|
|
373
|
+
* Side effect: Add emtpy error message to question's option parameter
|
|
374
|
+
**/
|
|
375
|
+
public function empty(str:String):Boolean
|
|
376
|
+
{
|
|
377
|
+
if(str.length == 0)
|
|
378
|
+
{
|
|
379
|
+
options.errorMessage = "Please look over the highlighted fields and enter information where necessary.";
|
|
380
|
+
options.errorTitle = "Missing Information";
|
|
381
|
+
return true;
|
|
382
|
+
}
|
|
383
|
+
return false;
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|