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,72 @@
|
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
|
2
|
+
package nm.gameServ.common
|
|
3
|
+
{
|
|
4
|
+
import nm.util.Objects;
|
|
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";
|
|
10
|
+
public var id:Number;
|
|
11
|
+
public var type:String;
|
|
12
|
+
public var questions:Array;
|
|
13
|
+
public var answers:Array;
|
|
14
|
+
public var options:Object;
|
|
15
|
+
public var assets:Array = [];
|
|
16
|
+
public function Question(type:String = QA_QUESTION, options:Object = null, id:Number = 0){
|
|
17
|
+
this.type = type
|
|
18
|
+
this.id = id;
|
|
19
|
+
questions = new Array();
|
|
20
|
+
answers = new Array();
|
|
21
|
+
this.options = options == null? new Object() : options;
|
|
22
|
+
}
|
|
23
|
+
public function addQItem(text:String, options:Object):void{
|
|
24
|
+
questions.push(constructNewItem(text, options));
|
|
25
|
+
}
|
|
26
|
+
public function addAItem(text:String, options:Object, value:Number = undefined):void{
|
|
27
|
+
answers.push(constructNewItem(text, options, value));
|
|
28
|
+
}
|
|
29
|
+
/*
|
|
30
|
+
* TODO: What should be the default value for value
|
|
31
|
+
*/
|
|
32
|
+
private function constructNewItem(text:String, options:Object, value:Number = NaN):Object{
|
|
33
|
+
var newItem:Object = new Object();
|
|
34
|
+
newItem.options = new Object();
|
|
35
|
+
for(var i:String in options) newItem.options[i] = options[i];
|
|
36
|
+
newItem.text = text;
|
|
37
|
+
if(!isNaN(value)){
|
|
38
|
+
if(value >= 0 && value <= 100) newItem.value = value
|
|
39
|
+
else newItem.value = value
|
|
40
|
+
}
|
|
41
|
+
return newItem;
|
|
42
|
+
}
|
|
43
|
+
public function addOption(name:String, value:Number):void{
|
|
44
|
+
options[name] = value;
|
|
45
|
+
}
|
|
46
|
+
public function clone():Question{
|
|
47
|
+
var clone:Question = new Question(type, null, id);
|
|
48
|
+
var i:String;
|
|
49
|
+
for(i in options){
|
|
50
|
+
clone.options[i] = options[i];
|
|
51
|
+
}
|
|
52
|
+
for(i in answers){
|
|
53
|
+
clone.answers[i] = answers[i];
|
|
54
|
+
}
|
|
55
|
+
for(i in questions){
|
|
56
|
+
clone.questions[i] = questions[i];
|
|
57
|
+
}
|
|
58
|
+
return clone;
|
|
59
|
+
}
|
|
60
|
+
public static function convertObject(obj:Object):Question
|
|
61
|
+
{
|
|
62
|
+
var q:Question = new Question();
|
|
63
|
+
if(obj.questions != null) q.questions = obj["questions"];
|
|
64
|
+
if(obj.answers != null) q.answers = obj["answers"];
|
|
65
|
+
if( obj["assets"] ) q.assets = Objects.copyArray(obj["assets"]);
|
|
66
|
+
if( obj["options"] ) q.options = Objects.copyObject(obj["options"]);
|
|
67
|
+
q.id = obj["id"];
|
|
68
|
+
q.type = obj["type"];
|
|
69
|
+
return q;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
|
2
|
+
package nm.gameServ.common
|
|
3
|
+
{
|
|
4
|
+
public class QuestionGroup
|
|
5
|
+
{
|
|
6
|
+
public var items:Array
|
|
7
|
+
public var name:String
|
|
8
|
+
public var options:Object
|
|
9
|
+
public var id:Number
|
|
10
|
+
public var rand:Boolean
|
|
11
|
+
public var assets:Array = [];
|
|
12
|
+
|
|
13
|
+
public function QuestionGroup(name:String, random:Boolean = false, id:Number = 0)
|
|
14
|
+
{
|
|
15
|
+
this.name = name
|
|
16
|
+
items = new Array();
|
|
17
|
+
options = new Object();
|
|
18
|
+
this.rand = false;
|
|
19
|
+
this.id = id
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
public function addGroup(name:*, index:Number):QuestionGroup
|
|
23
|
+
{
|
|
24
|
+
var newGroup:QuestionGroup = (name is QuestionGroup) ? name : new QuestionGroup(name);
|
|
25
|
+
if(index > 0) items.splice(index, 0, newGroup) // index sent, so splice group into the array
|
|
26
|
+
else items.push(newGroup); // no index so push onto the array
|
|
27
|
+
return newGroup;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public function removeGroup(index:Number):QuestionGroup
|
|
31
|
+
{
|
|
32
|
+
if(items[index] is QuestionGroup) return items.splice(index, 1)[0];
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public function addQuestion(type:String, Qtext:String, Atext:String, options:Object, Qoptions:Object, Aoptions:Object, index:Number):Question
|
|
37
|
+
{
|
|
38
|
+
var q:Question = new Question(type, options);
|
|
39
|
+
q.addQItem(Qtext, Qoptions)
|
|
40
|
+
q.addAItem(Atext, Aoptions)
|
|
41
|
+
items.push(q);
|
|
42
|
+
return q
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
public function removeQuestion(index:Number):Question
|
|
46
|
+
{
|
|
47
|
+
if(items[index] is Question) return items.splice(index, 1)[0];
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public function getChild(index:Number):Object
|
|
52
|
+
{
|
|
53
|
+
return items[index];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public function addOption(name:String, value:Number):void
|
|
57
|
+
{
|
|
58
|
+
options[name] = value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public static function convertObject(obj:Object):QuestionSet
|
|
62
|
+
{
|
|
63
|
+
var qset:QuestionSet = new QuestionSet("", false, 0);
|
|
64
|
+
qset.name = obj.name;
|
|
65
|
+
qset.items = obj.items;
|
|
66
|
+
qset.id = obj.id;
|
|
67
|
+
qset.options = obj.options;
|
|
68
|
+
qset.rand = obj.rand;
|
|
69
|
+
qset.assets = obj.assets;
|
|
70
|
+
return qset;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
public function clone():QuestionGroup
|
|
74
|
+
{
|
|
75
|
+
var clone:QuestionGroup = new QuestionGroup(name, rand, id);
|
|
76
|
+
for(var i:String in options)
|
|
77
|
+
{
|
|
78
|
+
clone.options[i] = options[i];
|
|
79
|
+
}
|
|
80
|
+
for(var j:String in items)
|
|
81
|
+
{
|
|
82
|
+
clone.items[j] = items[j].clone();
|
|
83
|
+
}
|
|
84
|
+
return clone;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
|
2
|
+
package nm.gameServ.common
|
|
3
|
+
{
|
|
4
|
+
public class QuestionSet extends QuestionGroup
|
|
5
|
+
{
|
|
6
|
+
public function QuestionSet(name:String = "", random:Boolean = false, id:Number = 0)
|
|
7
|
+
{
|
|
8
|
+
super(name, random, id);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
override public function addQuestion(type:String, Qtext:String, Atext:String, options:Object, Qoptions:Object, Aoptions:Object, index:Number):Question
|
|
12
|
+
{
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public static function convertObject(obj:Object):QuestionSet
|
|
17
|
+
{
|
|
18
|
+
return QuestionSet(QuestionGroup.convertObject(obj));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public override function clone():QuestionGroup
|
|
22
|
+
{
|
|
23
|
+
var clone:QuestionSet = new QuestionSet(name, rand, id);
|
|
24
|
+
for(var i:String in items)
|
|
25
|
+
{
|
|
26
|
+
clone.items[i] = items[i].clone();
|
|
27
|
+
}
|
|
28
|
+
for(var j:String in options)
|
|
29
|
+
{
|
|
30
|
+
clone.options[j] = options[j];
|
|
31
|
+
}
|
|
32
|
+
return clone;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
package nm.gameServ.common {
|
|
2
|
+
public class WidgetSettings
|
|
3
|
+
{
|
|
4
|
+
public var title:String = "";
|
|
5
|
+
public var scoreType:String;
|
|
6
|
+
public static function convertFromObject(settings:Object):WidgetSettings
|
|
7
|
+
{
|
|
8
|
+
var result:WidgetSettings = new WidgetSettings();
|
|
9
|
+
if(settings.name) result.title = settings.name;
|
|
10
|
+
if(settings.widget.score_type) result.scoreType = settings.widget.score_type;
|
|
11
|
+
return result;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
|
2
|
+
package nm.gameServ.common.coms
|
|
3
|
+
{
|
|
4
|
+
public class ServerEvents
|
|
5
|
+
{
|
|
6
|
+
public static var ERROR:String = "error";
|
|
7
|
+
public static var RECEIVE_MESSAGE:String = "onMsg";
|
|
8
|
+
public static var CHECK_LOGIN:String = "onCheckLogin";
|
|
9
|
+
//public static var PROCESS_START:String = "procStart";
|
|
10
|
+
//public static var PROCESS_END:String = "procEnd";
|
|
11
|
+
public static const PROCESS_START:String = "procStart";
|
|
12
|
+
public static const PROCESS_END:String = 'procEnd';
|
|
13
|
+
public function ServerEvents() {
|
|
14
|
+
//This class is meant to hold static vars only
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
|
2
|
+
// Copyright (c) 2007 rubyamf.org (aaron@rubyamf.org)
|
|
3
|
+
// License - http://www.gnu.org/copyleft/gpl.html
|
|
4
|
+
package nm.gameServ.common.coms
|
|
5
|
+
{
|
|
6
|
+
import flash.events.Event;
|
|
7
|
+
/*
|
|
8
|
+
* ResultEvent - stores results of a service call
|
|
9
|
+
*/
|
|
10
|
+
public class ServerMessageEvent extends Event {
|
|
11
|
+
public static const SERVER_MESSAGE:String = 'srvMsg';
|
|
12
|
+
public var message:String;
|
|
13
|
+
public var messageType:int;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param message String Message recieved from server
|
|
17
|
+
*/
|
|
18
|
+
public function ServerMessageEvent(message:String, messageType:int=0){
|
|
19
|
+
super(SERVER_MESSAGE);
|
|
20
|
+
this.message = message;
|
|
21
|
+
this.messageType = messageType
|
|
22
|
+
}
|
|
23
|
+
/*
|
|
24
|
+
* toString - duh
|
|
25
|
+
*/
|
|
26
|
+
public override function toString():String
|
|
27
|
+
{
|
|
28
|
+
return "nm.gameServ.common.coms.ServerMessageEvent";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
|
2
|
+
/**
|
|
3
|
+
* A basic structure object representing a log item.
|
|
4
|
+
*/
|
|
5
|
+
package nm.gameServ.common.logging
|
|
6
|
+
{
|
|
7
|
+
public class Log
|
|
8
|
+
{
|
|
9
|
+
/* System Events */
|
|
10
|
+
public static const GAME_START:int = 1;
|
|
11
|
+
public static const GAME_END:int = 2;
|
|
12
|
+
public static const GAME_PAUSE:int = 3;
|
|
13
|
+
public static const GAME_RESTART:int = 4;
|
|
14
|
+
public static const ASSET_LOADING:int = 5;
|
|
15
|
+
public static const ASSET_LOADED:int = 6;
|
|
16
|
+
public static const FRAMEWORK_INITIALIZE:int = 7;
|
|
17
|
+
public static const PLAYID_REQUESTED:int = 8;
|
|
18
|
+
public static const PLAYID_CREATED:int = 9;
|
|
19
|
+
public static const GAME_UNPAUSED:int = 10;
|
|
20
|
+
public static const PROCESSING:int = 11;
|
|
21
|
+
public static const FINISHED_PROCESSING:int = 12;
|
|
22
|
+
public static const LOGGING_IN:int = 13;
|
|
23
|
+
public static const APPLYING_THEME:int = 14;
|
|
24
|
+
public static const GAME_STATE_CHANGED:int = 15;
|
|
25
|
+
public static const GAME_INITIALIZED:int = 16;
|
|
26
|
+
/* In-Widget User Events */
|
|
27
|
+
public static const KEY_PRESSED:int = 500;
|
|
28
|
+
public static const ITEM_SELECTED:int = 501;
|
|
29
|
+
public static const ITEM_DRAGGED:int = 502;
|
|
30
|
+
public static const ITEM_DROPPED:int = 503;
|
|
31
|
+
public static const TEXT_ENTERED:int = 504;
|
|
32
|
+
public static const TEXT_EDITED:int = 505;
|
|
33
|
+
public static const BUTTON_CLICKED:int = 506;
|
|
34
|
+
public static const VIEW:int = 507;
|
|
35
|
+
/* Scoring and Reporting */
|
|
36
|
+
public static const WIDGET_INTERACTION_UNSCORED:int = 1001;
|
|
37
|
+
public static const FINAL_SCORE_FROM_CLIENT:int = 1002;
|
|
38
|
+
public static const QUESTION_ANSWERED_UNSCORED:int = 1004;
|
|
39
|
+
public static const SCORE_FEEDBACK:int = 1008; // attaches a feedback message to a question (or game if qid is 0)
|
|
40
|
+
public static const SCORE_ALERT:int = 1009; // shows a popup at the score screen
|
|
41
|
+
/*
|
|
42
|
+
SCORE_ALERT - brigns up popopu
|
|
43
|
+
SCORE_FEEDBACK - adds bubble to grid view brings up message box
|
|
44
|
+
*/
|
|
45
|
+
/* Errors */
|
|
46
|
+
public static const GENERAL_ERROR:int = 1500;
|
|
47
|
+
public static const ASSET_NOT_FOUND:int = 1501;
|
|
48
|
+
public static const LOGIN_FAILURE:int = 1502;
|
|
49
|
+
public static const SESSION_HIJACK_ATTEMPT:int = 1503;
|
|
50
|
+
public static const NOT_LOGGED_IN:int = 1504;
|
|
51
|
+
public static const TIME_OUT:int = 1505;
|
|
52
|
+
public static const THEME_OJBECT_MISSING:int = 1506;
|
|
53
|
+
public static const QUESTION_CORRECT_REPORTED_INCORRECTLY:int = 1507;
|
|
54
|
+
public static const REPORTED_SCORE_DOESNT_MATCH_VERIFIED_SCORE:int = 1508;
|
|
55
|
+
public static const TIME_VALIDATION_FAILED:int = 1509;
|
|
56
|
+
public static const QUESTION_NOT_SCORED:int = 1510;
|
|
57
|
+
public var type:Number
|
|
58
|
+
public var identity:Number
|
|
59
|
+
public var text:String
|
|
60
|
+
public var value:String
|
|
61
|
+
public var serverTime:Number
|
|
62
|
+
public var gameTime:Number
|
|
63
|
+
// this is used to mark this as a log that should be encrypted
|
|
64
|
+
public var encrypt:Boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Create a new log
|
|
67
|
+
* @param type Numeric type of log
|
|
68
|
+
* @param text Text descriptor
|
|
69
|
+
* @param value Value of log
|
|
70
|
+
* @param gameTime Time stamp of the current game time
|
|
71
|
+
* @param vis visibility level
|
|
72
|
+
*/
|
|
73
|
+
public function Log(type:Number, identity:Number, text:String, value:String, gameTime:Number):void
|
|
74
|
+
{
|
|
75
|
+
this.type = type;
|
|
76
|
+
this.text = text;
|
|
77
|
+
this.identity = identity;
|
|
78
|
+
this.value = value;
|
|
79
|
+
this.gameTime = gameTime;
|
|
80
|
+
this.encrypt = false;
|
|
81
|
+
}
|
|
82
|
+
// return an object with that data needed to send this log to the server
|
|
83
|
+
public function getObject():Object
|
|
84
|
+
{
|
|
85
|
+
return {type:type, identity:identity, text:text, value:value, serverTime:serverTime, gameTime:gameTime};
|
|
86
|
+
}
|
|
87
|
+
public function toString():String
|
|
88
|
+
{
|
|
89
|
+
return "type: " + type + ' identity: ' + identity + ' text: ' + text + ' value: ' + value + ' gametime: ' + gameTime
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
|
2
|
+
package nm.gameServ.common.scoring {
|
|
3
|
+
import nm.errors.ScoringError;
|
|
4
|
+
import nm.gameServ.common.logging.Log;
|
|
5
|
+
import nm.gameServ.engines.EngineCore;
|
|
6
|
+
import nm.ui.AlertWindow;
|
|
7
|
+
public class Scoring
|
|
8
|
+
{
|
|
9
|
+
/**
|
|
10
|
+
* A reference to the EngineCore. Used as a channel to send logs to the server.
|
|
11
|
+
*/
|
|
12
|
+
private var _core:EngineCore;
|
|
13
|
+
/**
|
|
14
|
+
* The score type for this widget as retrieved from the database table gs_gameregistry->GR_ScoreType
|
|
15
|
+
*/
|
|
16
|
+
// private var _scoreType:String;
|
|
17
|
+
/**
|
|
18
|
+
* Constructor for Scoring Class
|
|
19
|
+
*/
|
|
20
|
+
public function Scoring(core:EngineCore, scoreType:String):void
|
|
21
|
+
{
|
|
22
|
+
_core = core;
|
|
23
|
+
// _scoreType = scoreType;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Widget interactions are a catch-all category for any (logged) widget activity that isn't
|
|
28
|
+
* categorized as an answered question or final score.
|
|
29
|
+
* It's up to the score module to make sense of the interaction and grade the widget appropriately.
|
|
30
|
+
* Examples include an individual question modifier (hint used, -50%), an overall score modifier (-20% to final score), or more esoteric cases.
|
|
31
|
+
*
|
|
32
|
+
* @param questionID the ID of the question associated with this interaction, if applicable. The score module can ignore it for cases where it doesn't apply.
|
|
33
|
+
* @param interactionType a string identifying what the interaction is, e.g.: 'hint_used', 'attempt_penalty', etc.
|
|
34
|
+
* @param value the value of the interaction, if applicable.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
public function submitInteractionForScoring(questionID:String, interactionType:String, value:String = ''):void
|
|
38
|
+
{
|
|
39
|
+
_core.addLog(Log.WIDGET_INTERACTION_UNSCORED, questionID, interactionType, value);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A final score submission from the client.
|
|
44
|
+
* In some situations, a widget may not pass back logs for individual questions/interactions, and only pass back a final score.
|
|
45
|
+
* For example, perhaps the widget scores on the client side and only provides the score.
|
|
46
|
+
*
|
|
47
|
+
* @param questionID if the final score is being determined by an individual question, its ID can be used here. Otherwise, just use 0.
|
|
48
|
+
* @param userAnswer if the final score is determined based on a user's answer. Can be an empty string otherwise.
|
|
49
|
+
* @param score the final score to return.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
public function submitFinalScoreFromClient(questionID:String, userAnswer:String, score:String = ''):void
|
|
53
|
+
{
|
|
54
|
+
_core.addLog(Log.FINAL_SCORE_FROM_CLIENT, questionID, userAnswer, score);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* An answered question submission.
|
|
59
|
+
* This is the most basic log type. Used in most ordinary responses for individual questions.
|
|
60
|
+
* @param questionID the ID of the question being answered
|
|
61
|
+
* @param userAnswer the response the user provided. This string is matched against the widget's QSET on the server to determine the correct answer.
|
|
62
|
+
* @param value the value isn't by default used to determine the score of the question, however it can be used to pass an additional value to be used in scoring.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
public function submitQuestionForScoring(questionID:String, userAnswer:String, value:String = ''):void
|
|
66
|
+
{
|
|
67
|
+
_core.addLog(Log.QUESTION_ANSWERED_UNSCORED, questionID, userAnswer, value);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Adds a message/feedback to the overall score screen
|
|
72
|
+
*/
|
|
73
|
+
public function addGlobalScoreFeedback(msg:String):void
|
|
74
|
+
{
|
|
75
|
+
_core.addLog(Log.SCORE_FEEDBACK, '0', msg);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* @private
|
|
79
|
+
* Throws an error and shows a popup whenever a function is used out of place
|
|
80
|
+
*/
|
|
81
|
+
private function error(fn:String, requiredScoreType:String):void
|
|
82
|
+
{
|
|
83
|
+
_core.alert("Scoring Error", "An error has occurred with the scoring of this widget. Please refresh and try again. If the problem persists, notify your instructor or contact an instructional designer.", AlertWindow.OK);
|
|
84
|
+
// throw new ScoringError("The function " + fn + "() can only be used when GR_ScoreType is set to " + requiredScoreType + " in the gs_gameregistry table of the database.\nGR_ScoreType is currently set to " + _scoreType + ". Please set GR_ScoreType to " + requiredScoreType + " in the database or use another function for scoring.");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
package nm.gameServ.common.storage
|
|
2
|
+
{
|
|
3
|
+
import flash.errors.EOFError;
|
|
4
|
+
import flash.events.EventDispatcher;
|
|
5
|
+
import nm.errors.StorageError;
|
|
6
|
+
import org.rubyamf.remoting.ssr.ResultEvent;
|
|
7
|
+
public class StorageManager extends EventDispatcher
|
|
8
|
+
{
|
|
9
|
+
private var _tables:Vector.<StorageTable>
|
|
10
|
+
/**
|
|
11
|
+
* Manages a list of StorageTables for easy access from a Widget Engine
|
|
12
|
+
*
|
|
13
|
+
* @param core A reference to the engine core
|
|
14
|
+
*/
|
|
15
|
+
public function StorageManager()
|
|
16
|
+
{
|
|
17
|
+
_tables = new Vector.<StorageTable>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Adds a StorageTable to the currently managed list of tables. StorageTables
|
|
21
|
+
* are used to store arbitrary information pertaining to a Widget.
|
|
22
|
+
*
|
|
23
|
+
* @id The name of the table to insert (used to insert to it later)
|
|
24
|
+
* @columns The names of the columns for this table
|
|
25
|
+
*/
|
|
26
|
+
public function addTable(id:String, ...columns):void
|
|
27
|
+
{
|
|
28
|
+
/* Search for a duplicate */
|
|
29
|
+
var target:StorageTable;
|
|
30
|
+
for(var i:int = 0; i < _tables.length; i++)
|
|
31
|
+
{
|
|
32
|
+
if(_tables[i].id == StorageTable.clean(id))
|
|
33
|
+
{
|
|
34
|
+
target = _tables[i];
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// Create the table or throw error if duplicate
|
|
39
|
+
if(target == null) _tables.push(new StorageTable(StorageTable.clean(id), columns));
|
|
40
|
+
else throw new StorageError("Table \"" + id + "\" already exists");
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Inserts a row into the the table with the given ID. Make sure the number
|
|
44
|
+
* of arguments after tableId matches the number of columns that belong to this
|
|
45
|
+
* table
|
|
46
|
+
*
|
|
47
|
+
* @param tableId The name of the table to insert the values to
|
|
48
|
+
* @param values The values to insert to the table
|
|
49
|
+
*/
|
|
50
|
+
public function insert(tableId:String, ...values):void
|
|
51
|
+
{
|
|
52
|
+
/* Search for the Table */
|
|
53
|
+
var target:StorageTable;
|
|
54
|
+
for(var i:int = 0; i < _tables.length; i++)
|
|
55
|
+
{
|
|
56
|
+
if(_tables[i].id == StorageTable.clean(tableId))
|
|
57
|
+
{
|
|
58
|
+
target = _tables[i];
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if(target == null) // throw error if not found
|
|
63
|
+
{
|
|
64
|
+
throw new StorageError("Data table \"" + tableId + "\" does not exist.");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
// Insert the row into the appropriate table
|
|
68
|
+
var result:Object = target.insert.apply(this, values);
|
|
69
|
+
dispatchEvent(new ResultEvent("sendStorage", false, false, result));
|
|
70
|
+
}
|
|
71
|
+
public function getTable(tableID:String):StorageTable
|
|
72
|
+
{
|
|
73
|
+
/* Search for the Table */
|
|
74
|
+
var target:StorageTable;
|
|
75
|
+
for(var i:int = 0; i < _tables.length; i++)
|
|
76
|
+
{
|
|
77
|
+
if(_tables[i].id == StorageTable.clean(tableID))
|
|
78
|
+
{
|
|
79
|
+
target = _tables[i];
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if(target == null) // throw error if not found
|
|
84
|
+
{
|
|
85
|
+
throw new StorageError("Data table \"" + tableID + "\" does not exist.");
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
return target;
|
|
89
|
+
}
|
|
90
|
+
}/* End Class */
|
|
91
|
+
}/* End Package */
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
package nm.gameServ.common.storage
|
|
2
|
+
{
|
|
3
|
+
import com.adobe.protocols.dict.Dict;
|
|
4
|
+
import flash.utils.Dictionary;
|
|
5
|
+
import nm.errors.StorageError;
|
|
6
|
+
import org.rubyamf.remoting.ssr.ResultEvent;
|
|
7
|
+
public class StorageTable
|
|
8
|
+
{
|
|
9
|
+
public var id:String;
|
|
10
|
+
private var columns:Vector.<String>;
|
|
11
|
+
private var rows:Vector.<Object>;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new StorageTable for storing data to the server.
|
|
14
|
+
* StorageTables are built to slightly mimic the functionality of database tables.
|
|
15
|
+
*
|
|
16
|
+
* @param id The name of this StorageTable
|
|
17
|
+
* @param columns The names of each of the columns for this table
|
|
18
|
+
*/
|
|
19
|
+
public function StorageTable(id:String, columns:Array)
|
|
20
|
+
{
|
|
21
|
+
this.id = StorageTable.clean(id);
|
|
22
|
+
this.columns = new Vector.<String>;
|
|
23
|
+
this.rows = new Vector.<Object>;
|
|
24
|
+
for(var i:int = 0; i < columns.length; i++)
|
|
25
|
+
{
|
|
26
|
+
this.columns.push(StorageTable.clean(columns[i] as String));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
public static function clean(name:String):String
|
|
30
|
+
{
|
|
31
|
+
var cleanName:String = name.replace(/\s/g, '_').replace(/[^\w]/g, '');
|
|
32
|
+
if(['userName', 'firstName', 'lastName', 'timestamp', 'playID'].indexOf(cleanName) >= 0)
|
|
33
|
+
{
|
|
34
|
+
throw new StorageError('Column name "'+name+'" is a protected keyword');
|
|
35
|
+
}
|
|
36
|
+
return cleanName;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Inserts a new row into this table.
|
|
40
|
+
*
|
|
41
|
+
* @param values The values to insert into the table. Make sure the number
|
|
42
|
+
* of arguments passed match the number of columns pertaining to this table.
|
|
43
|
+
*/
|
|
44
|
+
public function insert(...values):Object
|
|
45
|
+
{
|
|
46
|
+
/* Make sure arguments match number of columns */
|
|
47
|
+
if(values.length != columns.length)
|
|
48
|
+
{
|
|
49
|
+
throw new StorageError('StorageTable "' + id + '" requires ' + columns.length + " value(s) and received " + values.length);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
/* Create the row to add to the list of rows */
|
|
53
|
+
var result:Object = new Object();
|
|
54
|
+
for(var i:int = 0; i < values.length; i++)
|
|
55
|
+
{
|
|
56
|
+
result[StorageTable.clean(columns[i])] = String(values[i]);
|
|
57
|
+
}
|
|
58
|
+
rows.push(result);
|
|
59
|
+
/* Send this row to the server */
|
|
60
|
+
return {name:id, data:result};
|
|
61
|
+
}
|
|
62
|
+
public function getValues():Array
|
|
63
|
+
{
|
|
64
|
+
var values:Array = new Array();
|
|
65
|
+
for each(var row:Object in rows)
|
|
66
|
+
{
|
|
67
|
+
values.push(row)
|
|
68
|
+
}
|
|
69
|
+
return values
|
|
70
|
+
}
|
|
71
|
+
}/* End StorageTable Class */
|
|
72
|
+
}/* End Package */
|