mako 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,233 @@
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
2
|
+
package nm.ui
|
3
|
+
{
|
4
|
+
import flash.display.GradientType;
|
5
|
+
import flash.display.MovieClip;
|
6
|
+
import flash.geom.Matrix;
|
7
|
+
import flash.text.TextField;
|
8
|
+
import flash.text.TextFormat;
|
9
|
+
import it.animation.TweenSingleton;
|
10
|
+
import nm.draw.shapes.RectBorder;
|
11
|
+
public class StorageTank extends Component
|
12
|
+
{
|
13
|
+
protected static var TRACE_STRING:String = "StorageTank.as";
|
14
|
+
protected var bg:MovieClip
|
15
|
+
protected var fill:MovieClip
|
16
|
+
protected var proposedFill:MovieClip
|
17
|
+
protected var percentLabel:TextField
|
18
|
+
protected var availLabel:TextField
|
19
|
+
protected var totalLabel:TextField
|
20
|
+
protected var _totalKB:int;
|
21
|
+
protected var _proposedKB:int;
|
22
|
+
protected var _usedKB:int;
|
23
|
+
protected var _tweener:TweenSingleton;
|
24
|
+
protected var _rotation:Number = 0; // the rotation of the gradients
|
25
|
+
// used to make overriding easy for StorageTankHorizontal
|
26
|
+
public function StorageTank(width:Number=100, height:Number=200, kbUsed:int = 0, kbAvailible:int = 0)
|
27
|
+
{
|
28
|
+
////trace(TRACE_STRING + "::StorageTank");
|
29
|
+
super(false, width, height);
|
30
|
+
_usedKB = kbUsed;
|
31
|
+
_totalKB = kbAvailible;
|
32
|
+
bg = new MovieClip();
|
33
|
+
fill = new MovieClip();
|
34
|
+
proposedFill = new MovieClip();
|
35
|
+
percentLabel = new TextField();
|
36
|
+
availLabel = new TextField();
|
37
|
+
totalLabel = new TextField();
|
38
|
+
// it will be drawn for the first time when it is added to stage
|
39
|
+
}
|
40
|
+
protected function drawBGFill():void
|
41
|
+
{
|
42
|
+
bg.graphics.clear();
|
43
|
+
// draw gradient fill
|
44
|
+
var colors:Array = getStyle('bgColors')
|
45
|
+
var alphas:Array = [100, 100, 100]
|
46
|
+
var ratios:Array = [0, 0xB0, 0xFF];
|
47
|
+
var fillMatrix:Matrix = new Matrix();
|
48
|
+
fillMatrix.createGradientBox(width, height, _rotation, 0, 0);
|
49
|
+
bg.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, fillMatrix);
|
50
|
+
bg.graphics.drawRect(0,0,_width, _height);
|
51
|
+
//draw Border
|
52
|
+
RectBorder.draw(bg, 0, 0, width, height, getStyle("borderWidth"), getStyle("borderColor"), 1);
|
53
|
+
}
|
54
|
+
public override function draw():void
|
55
|
+
{
|
56
|
+
////trace(TRACE_STRING + "::draw");
|
57
|
+
styleDefaults();
|
58
|
+
// NOTE: creating the clips in the constructor
|
59
|
+
//bg = new MovieClip();
|
60
|
+
addChild(bg);
|
61
|
+
//fill = new MovieClip();
|
62
|
+
addChild(fill);
|
63
|
+
//proposedFill = new MovieClip();
|
64
|
+
addChild(proposedFill);
|
65
|
+
//percentLabel = new TextField();
|
66
|
+
addChild(percentLabel);
|
67
|
+
percentLabel.width = this.width;
|
68
|
+
percentLabel.selectable = false;
|
69
|
+
percentLabel.autoSize = 'center';
|
70
|
+
percentLabel.defaultTextFormat = new TextFormat('_sans', 20, 0xFFFFFF, true);
|
71
|
+
//availLabel = new TextField();
|
72
|
+
availLabel.width = this.width;
|
73
|
+
availLabel.selectable = false;
|
74
|
+
availLabel.autoSize = 'center';
|
75
|
+
availLabel.defaultTextFormat = new TextFormat('_sans', 10, 0);
|
76
|
+
addChild(availLabel);
|
77
|
+
//totalLabel = new TextField();
|
78
|
+
totalLabel.width = this.width;
|
79
|
+
totalLabel.selectable = false;
|
80
|
+
totalLabel.autoSize = 'center';
|
81
|
+
totalLabel.defaultTextFormat = new TextFormat('_sans', 10, 0);
|
82
|
+
addChild(totalLabel);
|
83
|
+
redraw();
|
84
|
+
}
|
85
|
+
public override function redraw():void
|
86
|
+
{
|
87
|
+
drawBGFill();
|
88
|
+
proposedFill.y = fill.y = height - getStyle('borderWidth')
|
89
|
+
drawGradientBar(proposedFill, 40, proposedPercent) // Math.floor(((proposedKB + _usedKB) / _totalKB)*100)
|
90
|
+
// only draw fill if total isnt unlimited and there is actually anything to draw
|
91
|
+
drawGradientBar(fill, 100, percent)
|
92
|
+
updateDisplay();
|
93
|
+
}
|
94
|
+
/**
|
95
|
+
* Any time the display may have changed, this is called
|
96
|
+
*/
|
97
|
+
protected function updateDisplay():void
|
98
|
+
{
|
99
|
+
if(_totalKB == -1)
|
100
|
+
{
|
101
|
+
percentLabel.text = '';
|
102
|
+
totalLabel.text = availLabel.text = 'unlimited';
|
103
|
+
drawGradientBar(proposedFill, 0, 0) ;
|
104
|
+
drawGradientBar(fill, 0, 0);
|
105
|
+
}
|
106
|
+
else
|
107
|
+
{
|
108
|
+
percentLabel.text = percent + '%';
|
109
|
+
percentLabel.y = height - percentLabel.height;
|
110
|
+
availLabel.text = formatSize(_totalKB-_usedKB) + ' avail.';
|
111
|
+
availLabel.y = -availLabel.height;
|
112
|
+
totalLabel.y = height;
|
113
|
+
totalLabel.text = formatSize(_totalKB) +' total';
|
114
|
+
drawGradientBar(proposedFill, .40, proposedPercent);
|
115
|
+
drawGradientBar(fill, 1.00, percent);
|
116
|
+
TweenSingleton.addTween(fill, "height", (height - (2*getStyle('borderWidth'))) * (percent/100), 20, 6)
|
117
|
+
TweenSingleton.addTween(proposedFill, 'height', (height - (2*getStyle('borderWidth'))) * (proposedPercent/100), 28, 6)
|
118
|
+
}
|
119
|
+
}
|
120
|
+
public function formatSize(kb:Number):String
|
121
|
+
{
|
122
|
+
var unit:String = 'kb'
|
123
|
+
if(kb >= 1048576){
|
124
|
+
unit = 'Gb'
|
125
|
+
kb = Math.round((kb / 1048576)*100)/100
|
126
|
+
}
|
127
|
+
else if(kb >= 1024){
|
128
|
+
unit = 'Mb'
|
129
|
+
kb = Math.round((kb / 1024)*10)/10
|
130
|
+
}
|
131
|
+
return kb + unit;
|
132
|
+
}
|
133
|
+
/**
|
134
|
+
* Draw the fill bars
|
135
|
+
* @param target movieclip to draw on
|
136
|
+
* @param alpha alpha you want the entire bar to be
|
137
|
+
* @param percent 0-100% value that will represent the bar's height
|
138
|
+
*/
|
139
|
+
protected function drawGradientBar(target:MovieClip, alpha:Number, percent:Number):void
|
140
|
+
{
|
141
|
+
target.graphics.clear()
|
142
|
+
var borderWidth:Number = getStyle('borderWidth');
|
143
|
+
var fillWidth:Number = width - (2*borderWidth);
|
144
|
+
var barHeight:Number = 1;
|
145
|
+
var colors:Array;
|
146
|
+
if(percent < getStyle('warnPercent'))
|
147
|
+
{
|
148
|
+
colors = getStyle('okColors')
|
149
|
+
}
|
150
|
+
else if(percent < getStyle('criticalPercent'))
|
151
|
+
{
|
152
|
+
colors = getStyle('warnColors')
|
153
|
+
}
|
154
|
+
else
|
155
|
+
{
|
156
|
+
colors = getStyle('criticalColors')
|
157
|
+
}
|
158
|
+
var alphas:Array = [alpha, alpha, alpha];
|
159
|
+
var ratios:Array = [0, 0x3F, 0xFF];
|
160
|
+
var fillMatrix:Matrix = new Matrix();
|
161
|
+
fillMatrix.createGradientBox(width, barHeight,_rotation, 0, 0);
|
162
|
+
target.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, fillMatrix);
|
163
|
+
target.graphics.drawRect(borderWidth, 0, fillWidth, -barHeight);
|
164
|
+
// the little highlights
|
165
|
+
var colors2:Array = [colors[0], 0xFFFFFF, colors[2]];
|
166
|
+
target.graphics.lineGradientStyle(GradientType.LINEAR, colors2, alphas, ratios, fillMatrix);
|
167
|
+
target.graphics.moveTo(borderWidth, -barHeight);
|
168
|
+
target.graphics.lineTo(fillWidth, -barHeight);
|
169
|
+
target.graphics.endFill();
|
170
|
+
}
|
171
|
+
/**
|
172
|
+
* Define all the style defaults for this component
|
173
|
+
*/
|
174
|
+
protected override function styleDefaults():void{
|
175
|
+
setStyle('warnPercent', 75)
|
176
|
+
setStyle('criticalPercent', 95);
|
177
|
+
setStyle('warnColors', [0xC1AF13, 0xE4CF12, 0x846B0D]);
|
178
|
+
setStyle('criticalColors', [0xBF4715, 0xD64521, 0x792117]);
|
179
|
+
setStyle('okColors', [0x62983D, 0x72AC4A, 0x3A6031]);
|
180
|
+
setStyle('borderColor', 0x000000);
|
181
|
+
setStyle('bgColors', [0x5E5E5E, 0xA6A6A6, 0x999999]);
|
182
|
+
setStyle('borderWidth', 1);
|
183
|
+
setStyle('percentColor', 0xFFFFFF);
|
184
|
+
setStyle('detailTextColor', 0x000000);
|
185
|
+
}
|
186
|
+
/**
|
187
|
+
* Set the storage display
|
188
|
+
* @param kbUsed Number, kb of space used
|
189
|
+
* @param kbAvailible Number, kb of space availible, for unlimited send -1
|
190
|
+
*/
|
191
|
+
public function setStorage(kbUsed:Number, kbAvailible:Number):void
|
192
|
+
{
|
193
|
+
////trace(TRACE_STRING + "::setStorage");
|
194
|
+
_usedKB= kbUsed
|
195
|
+
_totalKB = kbAvailible
|
196
|
+
updateDisplay();
|
197
|
+
}
|
198
|
+
protected function limitPercent(val:Number):Number
|
199
|
+
{
|
200
|
+
if(isNaN(val)) val = 0
|
201
|
+
else if(val > 100) val = 100
|
202
|
+
else if(val < 0 ) val = 0;
|
203
|
+
return val;
|
204
|
+
}
|
205
|
+
/**
|
206
|
+
* Get the percentage of used space based on the kbUsed and kbAvailible args, value is 1-100
|
207
|
+
*/
|
208
|
+
public function get percent():Number
|
209
|
+
{
|
210
|
+
var val:Number = Math.floor((_usedKB/_totalKB)*100);
|
211
|
+
return limitPercent(val);
|
212
|
+
}
|
213
|
+
/**
|
214
|
+
* Get the proposed space to be used as a percentage of the total space availible, value is 1-100
|
215
|
+
*/
|
216
|
+
public function get proposedPercent():Number
|
217
|
+
{
|
218
|
+
var val:Number = Math.floor(((_proposedKB + _usedKB) / _totalKB)*100)
|
219
|
+
return limitPercent(val);
|
220
|
+
}
|
221
|
+
/**
|
222
|
+
* Add a single display item to show the proposed change in storage. If your uploading 20kb and want to display that on the
|
223
|
+
* StorageTank, call setProposedChange(20) and a volume above the currently used kb will be drawn
|
224
|
+
* @param kbChange The delta in kb that the proposed storage will use (in addition to the current 145kb, I want to visualize what my 65kb upload will be)
|
225
|
+
*/
|
226
|
+
public function setProposedChange(kbChange:Number):void
|
227
|
+
{
|
228
|
+
////trace(TRACE_STRING + "::setProposedChange");
|
229
|
+
_proposedKB = kbChange
|
230
|
+
updateDisplay()
|
231
|
+
}
|
232
|
+
}
|
233
|
+
}
|
@@ -0,0 +1,109 @@
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
2
|
+
package nm.ui
|
3
|
+
{
|
4
|
+
import nm.ui.StorageTank;
|
5
|
+
import flash.display.GradientType;
|
6
|
+
import flash.display.MovieClip;
|
7
|
+
import flash.geom.Matrix;
|
8
|
+
import flash.text.TextField;
|
9
|
+
import flash.text.TextFormat;
|
10
|
+
import it.animation.TweenSingleton;
|
11
|
+
public class StorageTankHorizontal extends StorageTank
|
12
|
+
{
|
13
|
+
public function StorageTankHorizontal(width:Number=100, height:Number=200, kbUsed:int = 0, kbAvailible:int = 0)
|
14
|
+
{
|
15
|
+
_rotation = 3*Math.PI/2;
|
16
|
+
super(width, height, kbUsed, kbAvailible);
|
17
|
+
}
|
18
|
+
public override function draw():void
|
19
|
+
{
|
20
|
+
////trace(TRACE_STRING + "::draw");
|
21
|
+
styleDefaults();
|
22
|
+
bg = new MovieClip();
|
23
|
+
addChild(bg);
|
24
|
+
fill = new MovieClip();
|
25
|
+
fill.x = 1; // HACK CODE -> it was showing up a pixel off
|
26
|
+
addChild(fill);
|
27
|
+
proposedFill = new MovieClip();
|
28
|
+
proposedFill.x = 1; // HACK CODE -> it was showing up a pixel off
|
29
|
+
addChild(proposedFill);
|
30
|
+
percentLabel = new TextField();
|
31
|
+
percentLabel.width = this.width;
|
32
|
+
percentLabel.selectable = false;
|
33
|
+
percentLabel.autoSize = 'left';
|
34
|
+
percentLabel.defaultTextFormat = new TextFormat('_sans', 20, 0xFFFFFF, true);
|
35
|
+
addChild(percentLabel);
|
36
|
+
availLabel = new TextField();
|
37
|
+
availLabel.width = this.width;
|
38
|
+
availLabel.selectable = false;
|
39
|
+
availLabel.autoSize = 'left';
|
40
|
+
availLabel.defaultTextFormat = new TextFormat('_sans', 10, 0xffffff);
|
41
|
+
addChild(availLabel);
|
42
|
+
totalLabel = new TextField();
|
43
|
+
totalLabel.width = this.width;
|
44
|
+
totalLabel.selectable = false;
|
45
|
+
totalLabel.autoSize = 'right';
|
46
|
+
totalLabel.defaultTextFormat = new TextFormat('_sans', 10, 0xffffff);
|
47
|
+
addChild(totalLabel);
|
48
|
+
redraw();
|
49
|
+
}
|
50
|
+
protected override function updateDisplay():void
|
51
|
+
{
|
52
|
+
if(_totalKB == -1)
|
53
|
+
{
|
54
|
+
percentLabel.text = '';
|
55
|
+
totalLabel.text = availLabel.text = 'unlimited';
|
56
|
+
drawGradientBar(proposedFill, 0, 0) ;
|
57
|
+
drawGradientBar(fill, 0, 0);
|
58
|
+
}
|
59
|
+
else
|
60
|
+
{
|
61
|
+
percentLabel.text = percent + '%';
|
62
|
+
percentLabel.y = height - percentLabel.height;
|
63
|
+
availLabel.text = formatSize(_totalKB-_usedKB) + ' avail.';
|
64
|
+
availLabel.y = height;
|
65
|
+
totalLabel.y = height;
|
66
|
+
totalLabel.text = formatSize(_totalKB) +' total';
|
67
|
+
drawGradientBar(proposedFill, .40, proposedPercent);
|
68
|
+
drawGradientBar(fill, 1.00, percent);
|
69
|
+
TweenSingleton.addTween(fill, "width", (width - (2*getStyle('borderWidth'))) * (percent/100), 20, 6)
|
70
|
+
TweenSingleton.addTween(proposedFill, 'width', (width - (2*getStyle('borderWidth'))) * (proposedPercent/100), 28, 6)
|
71
|
+
}
|
72
|
+
}
|
73
|
+
protected override function drawGradientBar(target:MovieClip, alpha:Number, percent:Number):void
|
74
|
+
{
|
75
|
+
target.graphics.clear()
|
76
|
+
var borderWidth:Number = getStyle('borderWidth');
|
77
|
+
var colors:Array;
|
78
|
+
var barWidth:Number = 1;
|
79
|
+
var fillHeight:Number = height - (2*borderWidth);
|
80
|
+
if(percent < getStyle('warnPercent'))
|
81
|
+
{
|
82
|
+
colors = getStyle('okColors')
|
83
|
+
}
|
84
|
+
else if(percent < getStyle('criticalPercent'))
|
85
|
+
{
|
86
|
+
colors = getStyle('warnColors')
|
87
|
+
}
|
88
|
+
else
|
89
|
+
{
|
90
|
+
colors = getStyle('criticalColors')
|
91
|
+
}
|
92
|
+
var alphas:Array = [alpha, alpha, alpha];
|
93
|
+
var ratios:Array = [0, 0x3F, 0xFF];
|
94
|
+
var fillMatrix:Matrix = new Matrix();
|
95
|
+
fillMatrix.createGradientBox(barWidth, -height, _rotation, 0, 0);
|
96
|
+
target.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, fillMatrix);
|
97
|
+
target.graphics.drawRect(borderWidth, -height+(2*borderWidth), -barWidth, fillHeight);
|
98
|
+
// the little highlights
|
99
|
+
// TODO: fix this, it looks cool
|
100
|
+
/*
|
101
|
+
var colors2:Array = [colors[0], 0xFFFFFF, colors[2]];
|
102
|
+
target.graphics.lineGradientStyle(GradientType.LINEAR, colors2, alphas, ratios, fillMatrix);
|
103
|
+
target.graphics.moveTo(borderWidth, -barHeight);
|
104
|
+
target.graphics.lineTo(fillWidth, -barHeight);
|
105
|
+
target.graphics.endFill();
|
106
|
+
*/
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|