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,211 @@
|
|
|
1
|
+
// Copyright (c) 2007 rubyamf.org (aaron@rubyamf.org)
|
|
2
|
+
// License - http://www.gnu.org/copyleft/gpl.html
|
|
3
|
+
package org.rubyamf.remoting.ssr
|
|
4
|
+
{
|
|
5
|
+
import flash.events.ErrorEvent;
|
|
6
|
+
import flash.events.EventDispatcher;
|
|
7
|
+
import flash.net.Responder;
|
|
8
|
+
import flash.utils.*;
|
|
9
|
+
import org.rubyamf.remoting.ssr.FaultEvent;
|
|
10
|
+
import org.rubyamf.remoting.ssr.RemotingConnection;
|
|
11
|
+
import org.rubyamf.remoting.ssr.RemotingService;
|
|
12
|
+
import org.rubyamf.remoting.ssr.ResultEvent;
|
|
13
|
+
public class RemotingCall extends EventDispatcher
|
|
14
|
+
{
|
|
15
|
+
private var connection:RemotingConnection; //the remoting connection
|
|
16
|
+
private var operationPath:String; //the operation
|
|
17
|
+
private var responder:Responder; //a call responder
|
|
18
|
+
private var onresult:Function; //result handler
|
|
19
|
+
private var onfault:Function; //fault handler
|
|
20
|
+
private var args:Array; //call arguments
|
|
21
|
+
private var meta:Object; //operation meta (timeout, maxAttempts, returnArgs)
|
|
22
|
+
private var attempt:uint = 0; //number of attemts
|
|
23
|
+
private var busyInt:Number; //busy interval
|
|
24
|
+
private var timeoutInt:Number; //timeout interval
|
|
25
|
+
private var completed:Boolean = false; //complete flag
|
|
26
|
+
private var service:RemotingService
|
|
27
|
+
/*
|
|
28
|
+
* Constructor
|
|
29
|
+
* @param remotingConnection:RemotingConnection
|
|
30
|
+
* @param operation:String
|
|
31
|
+
* @param onresult:Function
|
|
32
|
+
* @param onfault:Function
|
|
33
|
+
* @param arguments:Array
|
|
34
|
+
* @param meta:Object
|
|
35
|
+
*/
|
|
36
|
+
public function RemotingCall(connection:RemotingConnection, operationPath:String, onresult:Function, onfault:Function, args:Array, meta:Object)
|
|
37
|
+
{
|
|
38
|
+
this.connection = connection;
|
|
39
|
+
this.operationPath = operationPath;
|
|
40
|
+
this.args = args;
|
|
41
|
+
this.onresult = onresult;
|
|
42
|
+
this.onfault = onfault;
|
|
43
|
+
this.meta = meta;
|
|
44
|
+
}
|
|
45
|
+
/*
|
|
46
|
+
* onResult - result of a remoting call. The result propogates through this method
|
|
47
|
+
* and is turned into a ResultEvent, then the onresult callback is called.
|
|
48
|
+
* @param obj:Object
|
|
49
|
+
*/
|
|
50
|
+
private function onResult(resObj:Object):void
|
|
51
|
+
{
|
|
52
|
+
if(!completed)
|
|
53
|
+
{
|
|
54
|
+
completed = true;
|
|
55
|
+
clearIntervals();
|
|
56
|
+
var re:ResultEvent = new ResultEvent(ResultEvent.RESULT, false, true, resObj);
|
|
57
|
+
var fe:FaultEvent = new FaultEvent(FaultEvent.FAULT, false, true, resObj);
|
|
58
|
+
try
|
|
59
|
+
{
|
|
60
|
+
if(resObj == null || resObj == undefined as Object)
|
|
61
|
+
{
|
|
62
|
+
service.removePendingCall();
|
|
63
|
+
dispatchEvent(re);
|
|
64
|
+
//service.dispatchResult(re);
|
|
65
|
+
(meta.returnArgs) ? onresult(re,args) : onresult(re);
|
|
66
|
+
}
|
|
67
|
+
else if(typeof(resObj) != 'object')
|
|
68
|
+
{
|
|
69
|
+
service.removePendingCall();
|
|
70
|
+
//service.dispatchResult(re);
|
|
71
|
+
dispatchEvent(re);
|
|
72
|
+
if (onresult != null) // this can be null and cause errors, this might be a problem
|
|
73
|
+
{
|
|
74
|
+
(meta.returnArgs) ? onresult(re,args) : onresult(re);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else if(resObj.faultCode != null && resObj.faultString != null)
|
|
78
|
+
{
|
|
79
|
+
if(resObj.faultString == 'Authentication Failed' && this.hasEventListener(FaultEvent.AUTHENTICATION_FAILED))
|
|
80
|
+
{
|
|
81
|
+
dispatchEvent(new ErrorEvent(FaultEvent.AUTHENTICATION_FAILED, false,false)); //dispatch to the service
|
|
82
|
+
}
|
|
83
|
+
else
|
|
84
|
+
{
|
|
85
|
+
service.removePendingCall();
|
|
86
|
+
(meta.returnArgs) ? onfault(fe,args) : onfault(fe);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else
|
|
90
|
+
{
|
|
91
|
+
service.removePendingCall();
|
|
92
|
+
//service.dispatchResult(re);
|
|
93
|
+
dispatchEvent(re);
|
|
94
|
+
(meta.returnArgs) ? onresult(re,args) : onresult(re);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch(e:*)
|
|
98
|
+
{
|
|
99
|
+
service.removePendingCall();
|
|
100
|
+
//service.dispatchResult(re);
|
|
101
|
+
dispatchEvent(re);
|
|
102
|
+
(meta.returnArgs) ? onresult(re,args) : onresult(re);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/*
|
|
107
|
+
* onFault - fault of a remoting call. The fault propogates through this method
|
|
108
|
+
* and is turned into a FaultEvent, then the onfault callback is called.
|
|
109
|
+
* @param obj:Object
|
|
110
|
+
*/
|
|
111
|
+
private function onFault(resObj:Object):void
|
|
112
|
+
{
|
|
113
|
+
completed = true;
|
|
114
|
+
clearIntervals();
|
|
115
|
+
try
|
|
116
|
+
{
|
|
117
|
+
if(resObj.faultString == 'Authentication Failed' && this.hasEventListener(FaultEvent.AUTHENTICATION_FAILED))
|
|
118
|
+
{
|
|
119
|
+
dispatchEvent(new ErrorEvent(FaultEvent.AUTHENTICATION_FAILED, false,false)); //dispatch to the service
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
}catch(e:*){} //do nothing. will forward to onFault handler if not dispatched correctly
|
|
123
|
+
var fe:FaultEvent = new FaultEvent(FaultEvent.FAULT, false, true, resObj);
|
|
124
|
+
try
|
|
125
|
+
{
|
|
126
|
+
service.removePendingCall();
|
|
127
|
+
(meta.returnArgs) ? onfault(fe,args) : onfault(fe);
|
|
128
|
+
}
|
|
129
|
+
catch(e:*){}
|
|
130
|
+
}
|
|
131
|
+
/*
|
|
132
|
+
* execute - execute the remoting call
|
|
133
|
+
*/
|
|
134
|
+
public function execute(service:RemotingService):void
|
|
135
|
+
{
|
|
136
|
+
this.service = service
|
|
137
|
+
if(!completed)
|
|
138
|
+
{
|
|
139
|
+
var responder:Responder = new Responder(onResult, onFault);
|
|
140
|
+
var callArgs:Array = new Array(operationPath, responder);
|
|
141
|
+
connection.call.apply(null, callArgs.concat(args));
|
|
142
|
+
if(attempt == 0)
|
|
143
|
+
{
|
|
144
|
+
if(meta.maxAttempts) busyInt = setInterval( handleBusy, RemotingService.BUSY_TIMEOUT);
|
|
145
|
+
if(meta.timeout) timeoutInt = setInterval( handleTimeout, meta.timeout);
|
|
146
|
+
}
|
|
147
|
+
this.service.addPendingCall();
|
|
148
|
+
attempt++;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/*
|
|
152
|
+
* handleBusy - when a busy timeout happens
|
|
153
|
+
*/
|
|
154
|
+
private function handleBusy():void
|
|
155
|
+
{
|
|
156
|
+
if(attempt >= meta.maxAttempts)
|
|
157
|
+
{
|
|
158
|
+
completed = true;
|
|
159
|
+
clearIntervals();
|
|
160
|
+
service.removePendingCall();
|
|
161
|
+
var fo:Object = {faultString:"" + operationPath + " was busy on all attempts.", faultCode:"SSR_SERVER_BUSY_TIMEOUT"};
|
|
162
|
+
var fe:FaultEvent = new FaultEvent(FaultEvent.FAULT, false, true, fo);
|
|
163
|
+
(meta.returnArgs) ? onfault(fe,args) : onfault(fe);
|
|
164
|
+
}
|
|
165
|
+
else
|
|
166
|
+
{
|
|
167
|
+
execute(service);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/*
|
|
171
|
+
* handleTimeout - when a timeout happens (from meta.timeout)
|
|
172
|
+
*/
|
|
173
|
+
private function handleTimeout():void
|
|
174
|
+
{
|
|
175
|
+
if(!completed)
|
|
176
|
+
{
|
|
177
|
+
if(attempt > meta.maxAttempts)
|
|
178
|
+
{
|
|
179
|
+
completed = true;
|
|
180
|
+
clearIntervals();
|
|
181
|
+
service.removePendingCall();
|
|
182
|
+
var fo:Object = {
|
|
183
|
+
faultString:"faultString: " + operationPath + " timed out completely over " + meta.maxAttempts + " attempts.",
|
|
184
|
+
faultCode:"faultCode: SSR_COMPLETE_TIMEOUT"
|
|
185
|
+
}
|
|
186
|
+
var fe:FaultEvent = new FaultEvent(FaultEvent.FAULT, false, true, fo);
|
|
187
|
+
(meta.returnArgs) ? onfault(fe,args) : onfault(fe);
|
|
188
|
+
}
|
|
189
|
+
else
|
|
190
|
+
{
|
|
191
|
+
execute(service);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/*
|
|
196
|
+
* clearIntervals - clears timeout intervals
|
|
197
|
+
*/
|
|
198
|
+
private function clearIntervals():void
|
|
199
|
+
{
|
|
200
|
+
clearInterval(busyInt);
|
|
201
|
+
clearInterval(timeoutInt);
|
|
202
|
+
}
|
|
203
|
+
/*
|
|
204
|
+
* toString
|
|
205
|
+
*/
|
|
206
|
+
//public function toString():String
|
|
207
|
+
//{
|
|
208
|
+
// return "org.rubyamf.remoting.ssr.RemotingCall";
|
|
209
|
+
//}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright (c) 2007 rubyamf.org (aaron@rubyamf.org)
|
|
2
|
+
// License - http://www.gnu.org/copyleft/gpl.html
|
|
3
|
+
package org.rubyamf.remoting.ssr
|
|
4
|
+
{
|
|
5
|
+
import flash.net.NetConnection;
|
|
6
|
+
import flash.net.ObjectEncoding;
|
|
7
|
+
/*
|
|
8
|
+
* RemotinConnection - a child of NetConnection that adds methods to support AppendToGatewayUrl, AddHeader, setCredentials and ReplaceGatewayUrl
|
|
9
|
+
*/
|
|
10
|
+
public class RemotingConnection extends NetConnection
|
|
11
|
+
{
|
|
12
|
+
/*
|
|
13
|
+
* AppendToGatewayUrl - AMF0
|
|
14
|
+
*/
|
|
15
|
+
public function AppendToGatewayUrl(s:String):void{}
|
|
16
|
+
/*
|
|
17
|
+
* AddHeader - add a persistent header. After adding a header it get's sent with every request
|
|
18
|
+
*/
|
|
19
|
+
public function AddHeader(name:String, mustUnderstand:Boolean, value:Object ):void
|
|
20
|
+
{
|
|
21
|
+
super.addHeader(name, mustUnderstand, value);
|
|
22
|
+
}
|
|
23
|
+
/*
|
|
24
|
+
* ReplaceGatewayUrl - Replace the current gateway url
|
|
25
|
+
*/
|
|
26
|
+
public function ReplaceGatewayUrl():void{}
|
|
27
|
+
/*
|
|
28
|
+
* setCredentials - implements authentication
|
|
29
|
+
* @param username:String
|
|
30
|
+
* @param password:String
|
|
31
|
+
*/
|
|
32
|
+
public function setCredentials( username:String, password:String ):void
|
|
33
|
+
{
|
|
34
|
+
super.addHeader( "Credentials", false, { userid:username, password:password } );
|
|
35
|
+
}
|
|
36
|
+
public override function toString():String
|
|
37
|
+
{
|
|
38
|
+
return "org.rubyamf.remoting.ssr.ResultEvent";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// Copyright (c) 2007 rubyamf.org (aaron@rubyamf.org)
|
|
2
|
+
// License - http://www.gnu.org/copyleft/gpl.html
|
|
3
|
+
package org.rubyamf.remoting.ssr
|
|
4
|
+
{
|
|
5
|
+
import flash.events.*;
|
|
6
|
+
import flash.net.ObjectEncoding;
|
|
7
|
+
import flash.utils.Proxy;
|
|
8
|
+
import flash.utils.flash_proxy;
|
|
9
|
+
import org.rubyamf.remoting.ssr.RemotingCall;
|
|
10
|
+
import org.rubyamf.remoting.ssr.RemotingConnection;
|
|
11
|
+
public dynamic class RemotingService extends Proxy implements IEventDispatcher
|
|
12
|
+
{
|
|
13
|
+
public static var BUSY_TIMEOUT:Number = 3500; //server busy time
|
|
14
|
+
private var PendingCalls:Number = 0; //amount of current remoting calls
|
|
15
|
+
private var gateway:String; //the gateway location
|
|
16
|
+
private var service:String; //the service to call
|
|
17
|
+
private var connection:RemotingConnection; //the remoting connection
|
|
18
|
+
private var eventDispatcher:EventDispatcher; //concrete event dispatcher
|
|
19
|
+
private var remotingID:String
|
|
20
|
+
/*
|
|
21
|
+
* Constructor
|
|
22
|
+
* @param gateway:String
|
|
23
|
+
* @param service:String
|
|
24
|
+
* @param objectEncoding:Number
|
|
25
|
+
*/
|
|
26
|
+
public function RemotingService(gate:String, serv:String, objectEncoding:Number = 3){
|
|
27
|
+
if(gate == '')
|
|
28
|
+
throw(new Error("Gateway cannot be null"));
|
|
29
|
+
if(serv == '')
|
|
30
|
+
throw(new Error("Service path cannot be null"));
|
|
31
|
+
if(objectEncoding != 0 && objectEncoding != 3)
|
|
32
|
+
throw(new Error("Object encoding must be 0 0r 3"));
|
|
33
|
+
gateway = gate;
|
|
34
|
+
service = serv;
|
|
35
|
+
eventDispatcher = new EventDispatcher();
|
|
36
|
+
connection = new RemotingConnection();
|
|
37
|
+
connection.objectEncoding = objectEncoding;
|
|
38
|
+
connection.addEventListener(NetStatusEvent.NET_STATUS, onConnectionStatus, false, 0, true);
|
|
39
|
+
connection.addEventListener(IOErrorEvent.IO_ERROR, onConnectionError, false, 0, true);
|
|
40
|
+
connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR , onConnectionError, false, 0, true);
|
|
41
|
+
connection.connect(gateway);
|
|
42
|
+
}
|
|
43
|
+
public function destroy():void
|
|
44
|
+
{
|
|
45
|
+
connection.removeEventListener(NetStatusEvent.NET_STATUS, onConnectionStatus);
|
|
46
|
+
connection.removeEventListener(IOErrorEvent.IO_ERROR, onConnectionError);
|
|
47
|
+
connection.removeEventListener(SecurityErrorEvent.SECURITY_ERROR , onConnectionError);
|
|
48
|
+
}
|
|
49
|
+
/*
|
|
50
|
+
* onConnectionError
|
|
51
|
+
*/
|
|
52
|
+
private function onConnectionError(event:ErrorEvent):void{
|
|
53
|
+
dispatchEvent(new FaultEvent(FaultEvent.CONNECTION_ERROR, true, true, {text:"Connection Error: " + event.text}));
|
|
54
|
+
}
|
|
55
|
+
/*
|
|
56
|
+
* onConnectionStatus
|
|
57
|
+
*/
|
|
58
|
+
private function onConnectionStatus(event:NetStatusEvent):void{
|
|
59
|
+
switch(event.info.code)
|
|
60
|
+
{
|
|
61
|
+
case "NetConnection.Call.Failed":
|
|
62
|
+
dispatchEvent(new FaultEvent(FaultEvent.CONNECTION_ERROR, true, true, {text:"Connection Error: " + event.info.code}));
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/*
|
|
67
|
+
* call
|
|
68
|
+
*/
|
|
69
|
+
private function call(methodName:String, args:Array, onResult:Function, onFault:Function, meta:Object):void
|
|
70
|
+
{
|
|
71
|
+
var operationPath:String = service + "." + methodName.toString();
|
|
72
|
+
var operation:RemotingCall = new RemotingCall(connection, operationPath, onResult, onFault, args, meta);
|
|
73
|
+
operation.addEventListener(FaultEvent.AUTHENTICATION_FAILED, handleAuthFailure, false, 0, true);
|
|
74
|
+
operation.addEventListener(ResultEvent.RESULT, handleResult, false, 0, true);
|
|
75
|
+
operation.execute(this);
|
|
76
|
+
}
|
|
77
|
+
/*
|
|
78
|
+
* Authentication Failure
|
|
79
|
+
*/
|
|
80
|
+
private function handleAuthFailure(e:*):void{
|
|
81
|
+
dispatchEvent(new FaultEvent(FaultEvent.AUTHENTICATION_FAILED, true,true, {text:'Authentication Failed'}));
|
|
82
|
+
}
|
|
83
|
+
/*
|
|
84
|
+
* Result obtained
|
|
85
|
+
*/
|
|
86
|
+
private function handleResult(event:ResultEvent):void{
|
|
87
|
+
dispatchEvent(new ResultEvent(ResultEvent.RESULT, event.bubbles, event.cancelable, event.result));
|
|
88
|
+
}
|
|
89
|
+
/*
|
|
90
|
+
* callProperty - proxy override (__resolve)
|
|
91
|
+
*/
|
|
92
|
+
flash_proxy override function callProperty(methodName:*, ...args):*{
|
|
93
|
+
if(!args[3])
|
|
94
|
+
args[3] = {}
|
|
95
|
+
//if method was apply, use other args for call, this is so that you can
|
|
96
|
+
//make remoting calles with string methods names, not having to use eval or
|
|
97
|
+
//some other hack
|
|
98
|
+
// myService.apply('myMethod',args,result,fault,metaObject); would be the same as:
|
|
99
|
+
// myService.myMethod(args,result,fault,metaObject);
|
|
100
|
+
if(methodName == 'apply')
|
|
101
|
+
{
|
|
102
|
+
if(!args[4])
|
|
103
|
+
{
|
|
104
|
+
args[4] = {}
|
|
105
|
+
}
|
|
106
|
+
try
|
|
107
|
+
{
|
|
108
|
+
call(args[0], args[1], args[2], args[3], args[4]);
|
|
109
|
+
}
|
|
110
|
+
catch(error:Error)
|
|
111
|
+
{
|
|
112
|
+
trace(error.toString());
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else
|
|
116
|
+
{
|
|
117
|
+
try
|
|
118
|
+
{
|
|
119
|
+
call(methodName.toString(), args[0], args[1], args[2], args[3]);
|
|
120
|
+
}
|
|
121
|
+
catch(error:Error)
|
|
122
|
+
{
|
|
123
|
+
trace(error.toString());
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
/*
|
|
129
|
+
* hasProperty - override getters to return false always
|
|
130
|
+
*/
|
|
131
|
+
flash_proxy override function hasProperty(name:*):Boolean{
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
/*
|
|
135
|
+
* getProperty - override getters to return null always
|
|
136
|
+
*/
|
|
137
|
+
flash_proxy override function getProperty(name:*):*{
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
/*
|
|
141
|
+
* addHeader - public facing method to add header persistent hader to RemotingConnection
|
|
142
|
+
*/
|
|
143
|
+
public function addHeader(name:String, mustUnderstand:Boolean, value:Object):void{
|
|
144
|
+
connection.AddHeader(name, mustUnderstand, value);
|
|
145
|
+
}
|
|
146
|
+
/*
|
|
147
|
+
* AppendToGatewayUrl - AMF0 compliancy
|
|
148
|
+
*/
|
|
149
|
+
public function AppendToGatewayUrl(s:String):void{
|
|
150
|
+
gateway += s;
|
|
151
|
+
}
|
|
152
|
+
/*
|
|
153
|
+
* ReplaceGatewayUrl - replace the current gateway with new
|
|
154
|
+
*/
|
|
155
|
+
public function ReplaceGatewayUrl(newGateway:String):void{
|
|
156
|
+
gateway = newGateway;
|
|
157
|
+
}
|
|
158
|
+
/*
|
|
159
|
+
* setCredentials - AMF0 compliancy. Implements authencication
|
|
160
|
+
*/
|
|
161
|
+
public function setCredentials(username:String, password:String):void{
|
|
162
|
+
connection.AddHeader('Credentials', false, {userid:username, password:password});
|
|
163
|
+
}
|
|
164
|
+
/*
|
|
165
|
+
* addPendingCall - add a pending call. Used internally to the remoting package.
|
|
166
|
+
*/
|
|
167
|
+
public function addPendingCall():void{
|
|
168
|
+
PendingCalls++;
|
|
169
|
+
}
|
|
170
|
+
/*
|
|
171
|
+
* removePendingCall - remove a pending call. Used internally to the remoting package.
|
|
172
|
+
*/
|
|
173
|
+
public function removePendingCall():void{
|
|
174
|
+
PendingCalls--;
|
|
175
|
+
}
|
|
176
|
+
/*
|
|
177
|
+
* addEventListener - implement EventDispatcher
|
|
178
|
+
*/
|
|
179
|
+
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, weakRef:Boolean = false):void{
|
|
180
|
+
eventDispatcher.addEventListener(type, listener, useCapture, priority, weakRef);
|
|
181
|
+
}
|
|
182
|
+
/*
|
|
183
|
+
* dispatchEvent - implement EventDispatcher
|
|
184
|
+
*/
|
|
185
|
+
public function dispatchEvent(event:Event):Boolean{
|
|
186
|
+
return eventDispatcher.dispatchEvent(event);
|
|
187
|
+
}
|
|
188
|
+
/*
|
|
189
|
+
* hasEventListener - implement EventDispatcher
|
|
190
|
+
*/
|
|
191
|
+
public function hasEventListener(type:String):Boolean{
|
|
192
|
+
return eventDispatcher.hasEventListener(type);
|
|
193
|
+
}
|
|
194
|
+
/*
|
|
195
|
+
* removeEventListener - implement EventDispatcher
|
|
196
|
+
*/
|
|
197
|
+
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void{
|
|
198
|
+
eventDispatcher.removeEventListener(type, listener, useCapture);
|
|
199
|
+
}
|
|
200
|
+
/*
|
|
201
|
+
* willTrigger - implement EventDispatcher
|
|
202
|
+
*/
|
|
203
|
+
public function willTrigger(type:String):Boolean{
|
|
204
|
+
return eventDispatcher.willTrigger(type);
|
|
205
|
+
}
|
|
206
|
+
public function dispatchResult(re:ResultEvent):void{
|
|
207
|
+
eventDispatcher.addEventListener(re.type, onReDispatch);
|
|
208
|
+
eventDispatcher.dispatchEvent(re);
|
|
209
|
+
}
|
|
210
|
+
// TODO: check if we should get rid of this?
|
|
211
|
+
private function onReDispatch(event:ResultEvent):void{
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Copyright (c) 2007 rubyamf.org (aaron@rubyamf.org)
|
|
2
|
+
// License - http://www.gnu.org/copyleft/gpl.html
|
|
3
|
+
package org.rubyamf.remoting.ssr
|
|
4
|
+
{
|
|
5
|
+
import flash.events.Event;
|
|
6
|
+
/*
|
|
7
|
+
* ResultEvent - stores results of a service call
|
|
8
|
+
*/
|
|
9
|
+
public class ResultEvent extends Event
|
|
10
|
+
{
|
|
11
|
+
public static const RESULT:String = "RESULT";
|
|
12
|
+
public var result:Object;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param type:String
|
|
16
|
+
* @param bubbles:Boolean
|
|
17
|
+
* @param cancelable:Boolean
|
|
18
|
+
* @param result:Object
|
|
19
|
+
*/
|
|
20
|
+
public function ResultEvent(type:String = "RESULT", bubbles:Boolean = false, cancelable:Boolean = false, result:* = null){
|
|
21
|
+
super(type, bubbles, cancelable);
|
|
22
|
+
this.result = result;
|
|
23
|
+
}
|
|
24
|
+
/*
|
|
25
|
+
* toString - duh
|
|
26
|
+
*/
|
|
27
|
+
public override function toString():String
|
|
28
|
+
{
|
|
29
|
+
return "org.rubyamf.remoting.ssr.ResultEvent";
|
|
30
|
+
}
|
|
31
|
+
public override function clone():Event
|
|
32
|
+
{
|
|
33
|
+
return new ResultEvent(type, bubbles, cancelable, result);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|