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,378 @@
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
2
|
+
package nm.ui {
|
3
|
+
import flash.display.Sprite;
|
4
|
+
import flash.events.MouseEvent;
|
5
|
+
import flash.events.TimerEvent;
|
6
|
+
import flash.geom.Rectangle;
|
7
|
+
import flash.utils.Timer;
|
8
|
+
import nm.events.StandardEvent;
|
9
|
+
public class ScrollBar_base extends Component
|
10
|
+
{
|
11
|
+
public static const SCROLL:String = "scroll";
|
12
|
+
private const DEBUG_MODE:Boolean = false;
|
13
|
+
protected var uArrow:Sprite
|
14
|
+
protected var dArrow:Sprite
|
15
|
+
protected var scroll_mc:Sprite
|
16
|
+
protected var bg:Sprite
|
17
|
+
protected var slider:Sprite
|
18
|
+
protected var _totalLines:Number
|
19
|
+
protected var _linesPerPage:Number
|
20
|
+
protected var currentScroll:Number
|
21
|
+
protected var sliderSpace:Number
|
22
|
+
protected var _wheelEnabled:Boolean
|
23
|
+
protected var isHoriz:Boolean
|
24
|
+
protected var _percentPerScroll:Number = 2;
|
25
|
+
protected var repeatMoveBy:Number
|
26
|
+
protected var timer:Timer
|
27
|
+
protected var autoHeight:Boolean = false;
|
28
|
+
private var _xHasBeenModified:Boolean = false;
|
29
|
+
private var _hasBeenDrawn:Boolean = false;
|
30
|
+
public function ScrollBar_base(width:int = 15, height:int = -1, totalLines:Number = 100, linesPerPage:Number = 1, currentScroll:Number = 0, isHoriz:Boolean = false)
|
31
|
+
{
|
32
|
+
super(true, width, height);
|
33
|
+
autoHeight = height == -1;
|
34
|
+
_totalLines = totalLines
|
35
|
+
_linesPerPage = linesPerPage
|
36
|
+
this.currentScroll = currentScroll;
|
37
|
+
this.isHoriz = isHoriz;
|
38
|
+
timer = new Timer(getStyle('scrollRate'));
|
39
|
+
}
|
40
|
+
private function print(...args):void
|
41
|
+
{
|
42
|
+
return;
|
43
|
+
}
|
44
|
+
protected override function styleDefaults():void
|
45
|
+
{
|
46
|
+
setStyle('minSliderH', 10);
|
47
|
+
setStyle('staticSliderH', width)
|
48
|
+
setStyle('scrollRate', 100)
|
49
|
+
}
|
50
|
+
public override function draw():void
|
51
|
+
{
|
52
|
+
super.draw();
|
53
|
+
_hasBeenDrawn = true;
|
54
|
+
//Take care of 'automatic' variable values
|
55
|
+
if(autoHeight) _height = parent.height;
|
56
|
+
if(!_xHasBeenModified) x = parent.width - _width;
|
57
|
+
setCurrentScroll(currentScroll)
|
58
|
+
//_wheelEnabled = false
|
59
|
+
wheelEnabled = true;
|
60
|
+
mkArrows();
|
61
|
+
mkBackground(); // need arrow sized before calculation for the background
|
62
|
+
mkSlider();// need background before calculation of this
|
63
|
+
redraw();
|
64
|
+
}
|
65
|
+
protected var beenDrawn:Boolean = false;
|
66
|
+
public override function redraw():void
|
67
|
+
{
|
68
|
+
//Only redraw if compenent has been drawn to begin with
|
69
|
+
if(_hasBeenDrawn == false) return;
|
70
|
+
if(autoHeight) _height = parent.height;
|
71
|
+
drawArrows();
|
72
|
+
drawBackground()
|
73
|
+
drawSlider()
|
74
|
+
syncSlider()
|
75
|
+
uArrow.y = 0;
|
76
|
+
dArrow.y = _height
|
77
|
+
if(isHoriz)
|
78
|
+
{
|
79
|
+
rotation = 270; //rotate
|
80
|
+
scaleX = -1.00; // flip top to bottom
|
81
|
+
}
|
82
|
+
}
|
83
|
+
protected function drawBackground():void
|
84
|
+
{
|
85
|
+
sliderSpace = _height - uArrow.height*2
|
86
|
+
}
|
87
|
+
protected function drawArrows():void{}
|
88
|
+
protected function drawSlider():void{}
|
89
|
+
/****** GUI Creation *********/
|
90
|
+
protected function assignEvents(target:Sprite, name:String):void
|
91
|
+
{
|
92
|
+
print("event added to scrollbar " +name + "Events");
|
93
|
+
var targF:Function = this[name + 'Events'];
|
94
|
+
target.addEventListener(MouseEvent.ROLL_OVER, targF,false,0,true)
|
95
|
+
target.addEventListener(MouseEvent.ROLL_OUT, targF,false,0,true)
|
96
|
+
target.addEventListener(MouseEvent.DOUBLE_CLICK, targF,false,0,true)
|
97
|
+
target.addEventListener(MouseEvent.MOUSE_DOWN, targF,false,0,true)
|
98
|
+
stage.addEventListener(MouseEvent.MOUSE_UP, targF,false,0,true)
|
99
|
+
}
|
100
|
+
protected function mkBackground():void
|
101
|
+
{
|
102
|
+
bg = new Sprite();
|
103
|
+
addChildAt(bg, 0);
|
104
|
+
assignEvents(bg, 'bg');
|
105
|
+
}
|
106
|
+
protected function mkArrows():void
|
107
|
+
{
|
108
|
+
uArrow = new Sprite();
|
109
|
+
uArrow.buttonMode = true;
|
110
|
+
addChild(uArrow)
|
111
|
+
assignEvents(uArrow, 'arrow')
|
112
|
+
dArrow = new Sprite();
|
113
|
+
dArrow.buttonMode = true;
|
114
|
+
addChild(dArrow);
|
115
|
+
assignEvents(dArrow, 'arrow')
|
116
|
+
dArrow.scaleY = -1; // flip the down arrow
|
117
|
+
}
|
118
|
+
protected function mkSlider():void
|
119
|
+
{
|
120
|
+
slider = new Sprite();
|
121
|
+
slider.buttonMode = true;
|
122
|
+
addChild(slider)
|
123
|
+
assignEvents(slider, 'slider')
|
124
|
+
}
|
125
|
+
/****** GUI Interaction ***********/
|
126
|
+
protected function bgEvents(eObj:MouseEvent):void
|
127
|
+
{
|
128
|
+
switch(eObj.type)
|
129
|
+
{
|
130
|
+
case MouseEvent.MOUSE_DOWN:
|
131
|
+
var y:Number = eObj.target.mouseY
|
132
|
+
var moveBy:Number = (y-uArrow.height > slider.y ? 1 : -1)
|
133
|
+
// if we have line data, we want to scroll by a page's full height
|
134
|
+
if(_totalLines > 0 && _linesPerPage > 0)
|
135
|
+
{
|
136
|
+
repeatMoveBy = 100*moveBy
|
137
|
+
timer.addEventListener('timer', bgRepeat,false,0,true);
|
138
|
+
timer.start();
|
139
|
+
scrollPagePercent(repeatMoveBy)
|
140
|
+
}
|
141
|
+
// no line data, so opperate just like the arrow buttons
|
142
|
+
else
|
143
|
+
{
|
144
|
+
repeatMoveBy = _percentPerScroll * moveBy
|
145
|
+
timer.addEventListener('timer', arrowRepeat,false,0,true);
|
146
|
+
timer.start();
|
147
|
+
scrollIncriment(repeatMoveBy)
|
148
|
+
}
|
149
|
+
break;
|
150
|
+
case MouseEvent.MOUSE_UP:
|
151
|
+
timer.removeEventListener('timer', (_totalLines > 0 && _linesPerPage > 0) ? bgRepeat : arrowRepeat);
|
152
|
+
timer.stop()
|
153
|
+
}
|
154
|
+
}
|
155
|
+
protected function arrowEvents(eObj:MouseEvent):void
|
156
|
+
{
|
157
|
+
switch(eObj.type)
|
158
|
+
{
|
159
|
+
case MouseEvent.MOUSE_DOWN:
|
160
|
+
repeatMoveBy = (eObj.target == uArrow ? -1 : 1) * _percentPerScroll
|
161
|
+
timer.addEventListener('timer', arrowRepeat,false,0,true)
|
162
|
+
timer.start();
|
163
|
+
scrollIncriment(repeatMoveBy)
|
164
|
+
break;
|
165
|
+
case MouseEvent.MOUSE_UP:
|
166
|
+
timer.removeEventListener('timer', arrowRepeat)
|
167
|
+
timer.stop();
|
168
|
+
}
|
169
|
+
}
|
170
|
+
protected function arrowRepeat(eObj:TimerEvent):void
|
171
|
+
{
|
172
|
+
scrollIncriment(repeatMoveBy);
|
173
|
+
}
|
174
|
+
protected function bgRepeat(eObj:TimerEvent):void
|
175
|
+
{
|
176
|
+
scrollPagePercent(repeatMoveBy);
|
177
|
+
}
|
178
|
+
protected function sliderEvents(eObj:MouseEvent):void
|
179
|
+
{
|
180
|
+
//////trace("EVENT: " + eObj.type);
|
181
|
+
switch(eObj.type)
|
182
|
+
{
|
183
|
+
case MouseEvent.MOUSE_DOWN:
|
184
|
+
var limitRect:Rectangle = new Rectangle(0,uArrow.height, 0, Math.ceil(sliderSpace - slider.height))
|
185
|
+
slider.startDrag(false, limitRect);
|
186
|
+
dispatchEvent(new StandardEvent('drag', true, true));
|
187
|
+
stage.addEventListener(MouseEvent.MOUSE_MOVE, onSliderMove, false, 0, true);
|
188
|
+
break;
|
189
|
+
case MouseEvent.MOUSE_UP:
|
190
|
+
slider.stopDrag()
|
191
|
+
if(stage) stage.removeEventListener(MouseEvent.MOUSE_MOVE, onSliderMove)
|
192
|
+
setCurrentScroll(((slider.y - uArrow.height)/(sliderSpace-slider.height))*100) // set the scroll without moving the slider
|
193
|
+
dispatchEvent(new StandardEvent('drag', false, true));
|
194
|
+
}
|
195
|
+
}
|
196
|
+
protected function setCurrentScroll(val:Number):void
|
197
|
+
{
|
198
|
+
print("setCurrentScroll");
|
199
|
+
if(isNaN(val)) return; // return if its not a number
|
200
|
+
if(val < 0) val = 0 // keep value above 0
|
201
|
+
if(val > 100) val = 100 // keep value below 100
|
202
|
+
currentScroll = val;
|
203
|
+
}
|
204
|
+
protected function onSliderMove(event:MouseEvent):void
|
205
|
+
{
|
206
|
+
print("onSliderMove");
|
207
|
+
setCurrentScroll((slider.y - uArrow.height) / (sliderSpace - slider.height) * 100)
|
208
|
+
dispatch()
|
209
|
+
}
|
210
|
+
protected function onMouseWheel(mEvent:MouseEvent):void
|
211
|
+
{
|
212
|
+
trace("mousewheel");
|
213
|
+
scrollPagePercent(-mEvent.delta*_percentPerScroll)
|
214
|
+
}
|
215
|
+
/********** UI Actions ****************/
|
216
|
+
protected function setSliderPos(position:Number):void
|
217
|
+
{
|
218
|
+
if(position == currentScroll) return;
|
219
|
+
setCurrentScroll(position)
|
220
|
+
syncSlider();
|
221
|
+
dispatch()
|
222
|
+
print("setSliderPos");
|
223
|
+
}
|
224
|
+
protected function syncSlider():void
|
225
|
+
{
|
226
|
+
print("synchSlider");
|
227
|
+
slider.y = Math.round((currentScroll/100) * (sliderSpace - slider.height) + uArrow.height); // locate the slider at the correct y location
|
228
|
+
}
|
229
|
+
protected function scrollPagePercent(percent:Number):void
|
230
|
+
{
|
231
|
+
print("scrollPagePercent");
|
232
|
+
if(_totalLines >0 && _linesPerPage > 0)
|
233
|
+
{
|
234
|
+
scrollIncriment((_linesPerPage * (percent/100)) * (100/(_totalLines-_linesPerPage)))
|
235
|
+
}
|
236
|
+
}
|
237
|
+
protected function scrollIncriment(delta:Number):void
|
238
|
+
{
|
239
|
+
setSliderPos(currentScroll + delta);
|
240
|
+
print("scrollIncriment");
|
241
|
+
}
|
242
|
+
protected function dispatch():void
|
243
|
+
{
|
244
|
+
//Dispatches event "scroll"
|
245
|
+
dispatchEvent(new StandardEvent(ScrollBar_base.SCROLL, currentScroll));
|
246
|
+
}
|
247
|
+
public override function destroy():void
|
248
|
+
{
|
249
|
+
slider.removeEventListener(MouseEvent.ROLL_OVER, sliderEvents);
|
250
|
+
slider.removeEventListener(MouseEvent.ROLL_OUT, sliderEvents);
|
251
|
+
slider.removeEventListener(MouseEvent.DOUBLE_CLICK, sliderEvents);
|
252
|
+
slider.removeEventListener(MouseEvent.MOUSE_DOWN, sliderEvents);
|
253
|
+
stage.removeEventListener(MouseEvent.MOUSE_UP, sliderEvents);
|
254
|
+
stage.removeEventListener(MouseEvent.MOUSE_MOVE, onSliderMove)
|
255
|
+
super.destroy();
|
256
|
+
}
|
257
|
+
/********** GETTERS/SETTERS ****************/
|
258
|
+
public function set totalLines(lines:Number):void
|
259
|
+
{
|
260
|
+
if(_totalLines != lines)
|
261
|
+
{
|
262
|
+
_totalLines = lines;
|
263
|
+
if(_linesPerPage >= 0 && stage != null)
|
264
|
+
{
|
265
|
+
drawSlider()
|
266
|
+
syncSlider()
|
267
|
+
}
|
268
|
+
}
|
269
|
+
print("setTotalLines");
|
270
|
+
}
|
271
|
+
public function get totalLines():Number
|
272
|
+
{
|
273
|
+
return _totalLines;
|
274
|
+
}
|
275
|
+
public function set linesPerPage(lines:Number):void
|
276
|
+
{
|
277
|
+
if(_linesPerPage != lines)
|
278
|
+
{
|
279
|
+
_linesPerPage = lines;
|
280
|
+
if(_totalLines >= 0 && stage != null)
|
281
|
+
{
|
282
|
+
drawSlider()
|
283
|
+
syncSlider()
|
284
|
+
}
|
285
|
+
}
|
286
|
+
print("setLinesPerPage");
|
287
|
+
}
|
288
|
+
public function get linesPerPage():Number
|
289
|
+
{
|
290
|
+
return _linesPerPage;
|
291
|
+
}
|
292
|
+
public function set scroll(scroll:Number):void
|
293
|
+
{
|
294
|
+
setSliderPos(scroll)
|
295
|
+
print("setscroll");
|
296
|
+
}
|
297
|
+
public function get scroll():Number
|
298
|
+
{
|
299
|
+
return currentScroll;
|
300
|
+
}
|
301
|
+
public function get wheelEnabled():Boolean
|
302
|
+
{
|
303
|
+
return _wheelEnabled;
|
304
|
+
}
|
305
|
+
public function set wheelEnabled(val:Boolean):void
|
306
|
+
{
|
307
|
+
var target:Sprite = Sprite(parent);
|
308
|
+
if(val && !target.hasEventListener(MouseEvent.MOUSE_WHEEL)) target.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel,false,0,true)
|
309
|
+
else if(!val) target.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel)
|
310
|
+
_wheelEnabled = val;
|
311
|
+
}
|
312
|
+
public function get numPages():Number
|
313
|
+
{
|
314
|
+
return _totalLines/_linesPerPage;
|
315
|
+
}
|
316
|
+
public function set page(v:Number):void
|
317
|
+
{
|
318
|
+
setSliderPos((v / (numPages - 1)) * 100)
|
319
|
+
print("set page");
|
320
|
+
}
|
321
|
+
public function get page():Number
|
322
|
+
{
|
323
|
+
return Math.round((currentScroll/100)*(numPages-1))
|
324
|
+
}
|
325
|
+
public override function set x(val:Number):void
|
326
|
+
{
|
327
|
+
super.x = val;
|
328
|
+
_xHasBeenModified = true;
|
329
|
+
}
|
330
|
+
public override function set height(v:Number):void
|
331
|
+
{
|
332
|
+
autoHeight = v == -1;
|
333
|
+
_height = v
|
334
|
+
//mkArrows();
|
335
|
+
//mkBackground(); // need arrow sized before calculation for the background
|
336
|
+
// mkSlider();// need background before calculation of this
|
337
|
+
redraw();
|
338
|
+
//x -= width + 10;
|
339
|
+
// if(stage != null)
|
340
|
+
// {
|
341
|
+
// drawBackground()
|
342
|
+
// drawSlider()
|
343
|
+
// syncSlider()
|
344
|
+
// dArrow.y = v
|
345
|
+
// }
|
346
|
+
}
|
347
|
+
public function set scrollByPercent(val:Number):void
|
348
|
+
{
|
349
|
+
_percentPerScroll = val
|
350
|
+
print("scrollByPercent");
|
351
|
+
}
|
352
|
+
public function get scrollByPercent():Number
|
353
|
+
{
|
354
|
+
return _percentPerScroll;
|
355
|
+
}
|
356
|
+
public function set scrollByPagePercent(val:Number):void
|
357
|
+
{
|
358
|
+
if(_totalLines >0 && _linesPerPage > 0)
|
359
|
+
{
|
360
|
+
_percentPerScroll = (_linesPerPage * (val/100)) * (100/(_totalLines-_linesPerPage))
|
361
|
+
}
|
362
|
+
print("scrollByPagePercent");
|
363
|
+
}
|
364
|
+
public function get scrollByPagePercent():Number
|
365
|
+
{
|
366
|
+
return _percentPerScroll;
|
367
|
+
}
|
368
|
+
public function set scrollByLines(val:Number):void
|
369
|
+
{
|
370
|
+
scrollByPagePercent = (1 / _linesPerPage * 100) * val
|
371
|
+
print("scrollByLines");
|
372
|
+
}
|
373
|
+
public function get scrollByLines():Number
|
374
|
+
{
|
375
|
+
return _percentPerScroll/100 * _linesPerPage
|
376
|
+
}
|
377
|
+
}
|
378
|
+
}
|