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,196 @@
|
|
1
|
+
package materia.components.toolTips
|
2
|
+
{
|
3
|
+
import flash.display.Sprite;
|
4
|
+
import flash.filters.DropShadowFilter;
|
5
|
+
import flash.text.TextField;
|
6
|
+
import flash.text.TextFieldAutoSize;
|
7
|
+
import flash.text.TextFormat;
|
8
|
+
import mx.core.UIComponent;
|
9
|
+
public class KogneatoToolTip extends UIComponent
|
10
|
+
{
|
11
|
+
//Components:
|
12
|
+
protected var bg:Sprite;
|
13
|
+
protected var tf:TextField;
|
14
|
+
//Properties:
|
15
|
+
protected var _text:String;
|
16
|
+
//Flags:
|
17
|
+
protected var _bTextChanged:Boolean;
|
18
|
+
//Statics:
|
19
|
+
protected var DEFAULT_POINTER_ORIENTATION:String = "down"; //@TODO: How do I do this?
|
20
|
+
protected var DEFAULT_MIN_TF_WIDTH:int = 50;
|
21
|
+
protected var DEFAULT_MAX_TF_WIDTH:int = 300;
|
22
|
+
protected var DEFAULT_PTR_SIZE:int = 10;
|
23
|
+
protected var DEFAULT_PADDING:int = 7;
|
24
|
+
public function KogneatoToolTip()
|
25
|
+
{
|
26
|
+
super();
|
27
|
+
mouseEnabled = mouseChildren = false;
|
28
|
+
}
|
29
|
+
public function set text(val:String):void
|
30
|
+
{
|
31
|
+
_text = val;
|
32
|
+
_bTextChanged = true;
|
33
|
+
invalidateProperties();
|
34
|
+
}
|
35
|
+
public function get text():String
|
36
|
+
{
|
37
|
+
return _text;
|
38
|
+
}
|
39
|
+
protected override function createChildren():void
|
40
|
+
{
|
41
|
+
super.createChildren();
|
42
|
+
if(!bg)
|
43
|
+
{
|
44
|
+
bg = new Sprite();
|
45
|
+
addChild(bg);
|
46
|
+
}
|
47
|
+
if(!tf)
|
48
|
+
{
|
49
|
+
tf = new TextField();
|
50
|
+
//tf.text = 'XXXXXXXXXXXXXXXXX';
|
51
|
+
//tf.width = 300;
|
52
|
+
//tf.height = 1;
|
53
|
+
//tf.width = 1;
|
54
|
+
tf.autoSize = TextFieldAutoSize.LEFT;
|
55
|
+
//tf.multiline = tf.wordWrap = true;
|
56
|
+
//tf.setStyle('textAlign', 'center');
|
57
|
+
//tf.maxWidth = DEFAULT_MAX_TF_WIDTH;
|
58
|
+
addChild(tf);
|
59
|
+
}
|
60
|
+
}
|
61
|
+
protected override function commitProperties():void
|
62
|
+
{
|
63
|
+
super.commitProperties();
|
64
|
+
if(_bTextChanged)
|
65
|
+
{
|
66
|
+
_bTextChanged = false;
|
67
|
+
tf.text = _text;
|
68
|
+
tf.setTextFormat(new TextFormat('Verdana', 12, 0xFFFFFF, false, false, false, null, null, 'center'));
|
69
|
+
if(tf.width > DEFAULT_MAX_TF_WIDTH)
|
70
|
+
{
|
71
|
+
tf.width = DEFAULT_MAX_TF_WIDTH;
|
72
|
+
tf.multiline = tf.wordWrap = true;
|
73
|
+
}
|
74
|
+
else if(tf.width < DEFAULT_MIN_TF_WIDTH)
|
75
|
+
{
|
76
|
+
tf.autoSize = TextFieldAutoSize.NONE;
|
77
|
+
tf.width = DEFAULT_MIN_TF_WIDTH;
|
78
|
+
}
|
79
|
+
invalidateDisplayList();
|
80
|
+
}
|
81
|
+
}
|
82
|
+
/*
|
83
|
+
public override function get height():Number
|
84
|
+
{
|
85
|
+
return bg.height;
|
86
|
+
}*/
|
87
|
+
protected override function measure():void
|
88
|
+
{
|
89
|
+
super.measure();
|
90
|
+
measuredWidth = bg.width;
|
91
|
+
measuredHeight = bg.height;
|
92
|
+
measuredMinWidth = 50;
|
93
|
+
measuredMinHeight = 30;
|
94
|
+
}
|
95
|
+
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
|
96
|
+
{
|
97
|
+
super.updateDisplayList(unscaledWidth, unscaledHeight);
|
98
|
+
var pointerOrientation:String = getStyle("pointerOrientation");
|
99
|
+
var padding:int = DEFAULT_PADDING;
|
100
|
+
var strokeWidth:int = 4;
|
101
|
+
var ptrOffset:int = getStyle("pointerOffset");
|
102
|
+
//trace('DRAWING');
|
103
|
+
var tw:int = padding * 2 + tf.width; //tip width
|
104
|
+
var th:int = padding * 2 + tf.height; //tip height
|
105
|
+
var twh:int = tw / 2;
|
106
|
+
var thh:int = th / 2;
|
107
|
+
var ps:int = DEFAULT_PTR_SIZE;
|
108
|
+
var psh:int = ps / 2;
|
109
|
+
var cr:int = 4; //radius
|
110
|
+
bg.graphics.clear();
|
111
|
+
bg.graphics.lineStyle(strokeWidth, 0xFFFFFF, 0.3, true);
|
112
|
+
//Draw bubble with pointer oriented down
|
113
|
+
bg.graphics.beginFill(0x232323, .95);//0xe6e2d1
|
114
|
+
bg.graphics.moveTo(cr, 0);
|
115
|
+
bg.graphics.curveTo(0, 0, 0, cr);
|
116
|
+
bg.graphics.lineTo(0, th - cr);
|
117
|
+
bg.graphics.curveTo(0, th, cr, th);
|
118
|
+
bg.graphics.lineTo(twh - ps + ptrOffset, th);
|
119
|
+
bg.graphics.lineTo(twh + ptrOffset, th + ps);
|
120
|
+
bg.graphics.lineTo(twh + ps + ptrOffset, th);
|
121
|
+
bg.graphics.lineTo(tw - cr, th);
|
122
|
+
bg.graphics.curveTo(tw, th, tw, th - cr);
|
123
|
+
bg.graphics.lineTo(tw, cr);
|
124
|
+
bg.graphics.curveTo(tw, 0, tw - cr, 0);
|
125
|
+
bg.graphics.lineTo(cr, 0);
|
126
|
+
if(pointerOrientation == 'up')
|
127
|
+
{
|
128
|
+
bg.scaleY = -1;
|
129
|
+
//@TODO @HACK SUPER SUPER HACK ATTACK
|
130
|
+
if(ptrOffset == 0)
|
131
|
+
{
|
132
|
+
bg.y += bg.height - strokeWidth;
|
133
|
+
}
|
134
|
+
tf.x = padding;
|
135
|
+
tf.y = ps + padding;
|
136
|
+
}
|
137
|
+
else //down
|
138
|
+
{
|
139
|
+
tf.x = padding;
|
140
|
+
tf.y = padding;
|
141
|
+
}
|
142
|
+
/*
|
143
|
+
switch(pointerOrientation)
|
144
|
+
{
|
145
|
+
case 'up':
|
146
|
+
tf.x = -twh + padding;
|
147
|
+
tf.y = ps + padding;
|
148
|
+
bg.graphics.beginFill(0xe6e2d1, .95);
|
149
|
+
bg.graphics.moveTo(-ps + ptrOffset, ps);
|
150
|
+
bg.graphics.lineTo(ptrOffset, 0);
|
151
|
+
bg.graphics.lineTo(ps + ptrOffset, ps);
|
152
|
+
bg.graphics.lineTo(twh - cr, ps);
|
153
|
+
bg.graphics.curveTo(twh, ps, twh, ps + cr);
|
154
|
+
var topY:int = ps + th;
|
155
|
+
bg.graphics.lineTo(twh, topY - cr);
|
156
|
+
bg.graphics.curveTo(twh, topY, twh - cr, topY);
|
157
|
+
bg.graphics.lineTo(-twh + cr, topY);
|
158
|
+
bg.graphics.curveTo(-twh, topY, -twh, topY - cr);
|
159
|
+
bg.graphics.lineTo(-twh, ps + cr);
|
160
|
+
bg.graphics.curveTo(-twh, ps, -twh + cr, ps);
|
161
|
+
bg.graphics.lineTo(-ps + ptrOffset, ps);
|
162
|
+
bg.graphics.endFill();
|
163
|
+
break;
|
164
|
+
case 'down':
|
165
|
+
default:
|
166
|
+
tf.x = -twh + padding;
|
167
|
+
tf.y = -ps - padding - tf.height;
|
168
|
+
bg.graphics.beginFill(0xe6e2d1, .95);
|
169
|
+
bg.graphics.moveTo(-ps + ptrOffset, -ps);
|
170
|
+
bg.graphics.lineTo(ptrOffset, 0);
|
171
|
+
bg.graphics.lineTo(ps + ptrOffset, -ps);
|
172
|
+
bg.graphics.lineTo(twh - cr, -ps);
|
173
|
+
bg.graphics.curveTo(twh, -ps, twh, -ps - cr);
|
174
|
+
var topY:int = -ps - th;
|
175
|
+
bg.graphics.lineTo(twh, topY + cr);
|
176
|
+
bg.graphics.curveTo(twh, topY, twh - cr, topY);
|
177
|
+
bg.graphics.lineTo(-twh + cr, topY);
|
178
|
+
bg.graphics.curveTo(-twh, topY, -twh, topY + cr);
|
179
|
+
bg.graphics.lineTo(-twh, -ps - cr);
|
180
|
+
bg.graphics.curveTo(-twh, -ps, -twh + cr, -ps);
|
181
|
+
bg.graphics.lineTo(-ps + ptrOffset, -ps);
|
182
|
+
bg.graphics.endFill();
|
183
|
+
break;
|
184
|
+
}*/
|
185
|
+
//graphics.beginFill(0xFF0000, 0.2);
|
186
|
+
//graphics.drawRect(0, 0, bg.width, bg.height);
|
187
|
+
//graphics.endFill();
|
188
|
+
bg.filters = [new DropShadowFilter(3, 90, 0x0, 0.6, 2, 2, 1, 3)];
|
189
|
+
//bg.x = twh;
|
190
|
+
//bg.y = padding * 2 + th + ps;
|
191
|
+
//trace('ok so height is ' + bg.height);
|
192
|
+
setActualSize(bg.width, bg.height);
|
193
|
+
//measure();
|
194
|
+
}
|
195
|
+
}
|
196
|
+
}
|
@@ -0,0 +1,150 @@
|
|
1
|
+
package materia.components.toolTips
|
2
|
+
{
|
3
|
+
import flash.display.DisplayObject;
|
4
|
+
import flash.events.Event;
|
5
|
+
import flash.events.MouseEvent;
|
6
|
+
import flash.events.TimerEvent;
|
7
|
+
import flash.geom.Point;
|
8
|
+
import flash.utils.Timer;
|
9
|
+
import mx.core.Application;
|
10
|
+
import mx.core.UIComponent;
|
11
|
+
import mx.effects.Fade;
|
12
|
+
import mx.events.FlexEvent;
|
13
|
+
import mx.managers.PopUpManager;
|
14
|
+
import mx.managers.PopUpManagerChildList;
|
15
|
+
public class TipManager
|
16
|
+
{
|
17
|
+
protected static var curToolTip:KogneatoToolTip;
|
18
|
+
protected static var curTipTarget:UIComponent;
|
19
|
+
protected static var _enabled:Boolean = true;
|
20
|
+
protected static var _removeTimer:Timer;
|
21
|
+
protected static const REMOVE_DELAY:int = 10;
|
22
|
+
public function TipManager()
|
23
|
+
{
|
24
|
+
}
|
25
|
+
public static function set enabled(val:Boolean):void
|
26
|
+
{
|
27
|
+
_enabled = val;
|
28
|
+
}
|
29
|
+
public static function get enabled():Boolean
|
30
|
+
{
|
31
|
+
return _enabled;
|
32
|
+
}
|
33
|
+
public static function removeTip():void
|
34
|
+
{
|
35
|
+
_removeTimer = new Timer(REMOVE_DELAY, 1);
|
36
|
+
_removeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, handleRemoveTimerComplete);
|
37
|
+
_removeTimer.start();
|
38
|
+
if(curTipTarget)
|
39
|
+
{
|
40
|
+
curTipTarget.removeEventListener(MouseEvent.MOUSE_OUT, handleTargetMouseOut);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
protected static function handleRemoveTimerComplete(event:TimerEvent = null):void
|
44
|
+
{
|
45
|
+
if(_removeTimer)
|
46
|
+
{
|
47
|
+
_removeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, handleRemoveTimerComplete);
|
48
|
+
_removeTimer = null;
|
49
|
+
}
|
50
|
+
PopUpManager.removePopUp(curToolTip);
|
51
|
+
curToolTip = null;
|
52
|
+
curTipTarget = null;
|
53
|
+
}
|
54
|
+
public static function showTip(targetUIComponent:Object, tipText:String = '', orientation:String = '', addRemoveListener:Boolean = true):void
|
55
|
+
{
|
56
|
+
if(curToolTip)
|
57
|
+
{
|
58
|
+
if(curToolTip.text == tipText)
|
59
|
+
{
|
60
|
+
//Cancel the remove timer
|
61
|
+
if(_removeTimer)
|
62
|
+
{
|
63
|
+
_removeTimer.stop();
|
64
|
+
_removeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, handleRemoveTimerComplete);
|
65
|
+
_removeTimer = null;
|
66
|
+
}
|
67
|
+
if(addRemoveListener)
|
68
|
+
{
|
69
|
+
curTipTarget.addEventListener(MouseEvent.MOUSE_OUT, handleTargetMouseOut);
|
70
|
+
}
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
else
|
74
|
+
{
|
75
|
+
handleRemoveTimerComplete();
|
76
|
+
}
|
77
|
+
}
|
78
|
+
if(_enabled && tipText && tipText.length > 0)
|
79
|
+
{
|
80
|
+
curTipTarget = UIComponent(targetUIComponent);
|
81
|
+
if(addRemoveListener)
|
82
|
+
{
|
83
|
+
curTipTarget.addEventListener(MouseEvent.MOUSE_OUT, handleTargetMouseOut);
|
84
|
+
}
|
85
|
+
curToolTip = new KogneatoToolTip();
|
86
|
+
curToolTip.addEventListener(FlexEvent.UPDATE_COMPLETE, handleToolTipUpdateComplete);
|
87
|
+
if(orientation.length > 0)
|
88
|
+
{
|
89
|
+
switch(orientation)
|
90
|
+
{
|
91
|
+
case 'above':
|
92
|
+
curToolTip.setStyle("pointerOrientation", 'down');
|
93
|
+
break;
|
94
|
+
case 'below':
|
95
|
+
curToolTip.setStyle("pointerOrientation", 'up');
|
96
|
+
}
|
97
|
+
}
|
98
|
+
curToolTip.alpha = 0;
|
99
|
+
curToolTip.text = tipText;
|
100
|
+
PopUpManager.addPopUp(curToolTip, DisplayObject(Application.application), false, PopUpManagerChildList.POPUP);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
protected static function handleToolTipUpdateComplete(event:Event):void
|
104
|
+
{
|
105
|
+
if(curToolTip)
|
106
|
+
{
|
107
|
+
if(curToolTip.width > 0 && curToolTip.height > 0)
|
108
|
+
{
|
109
|
+
curToolTip.removeEventListener(FlexEvent.UPDATE_COMPLETE, handleToolTipUpdateComplete);
|
110
|
+
var p:Point = UIComponent(curTipTarget).localToGlobal(new Point());
|
111
|
+
var pointerOrientation:String = curToolTip.getStyle('pointerOrientation');
|
112
|
+
//trace('pointer orientation is ' + pointerOrientation);
|
113
|
+
if(pointerOrientation == 'down' || (pointerOrientation == null && p.y - curToolTip.height > 0))
|
114
|
+
{
|
115
|
+
curToolTip.move(p.x - (curToolTip.width / 2) + (curTipTarget.width / 2), p.y - curToolTip.height);
|
116
|
+
}
|
117
|
+
else
|
118
|
+
{
|
119
|
+
curToolTip.setStyle('pointerOrientation', 'up');
|
120
|
+
curToolTip.move(p.x - (curToolTip.width / 2) + (curTipTarget.width / 2), p.y + curTipTarget.height);
|
121
|
+
}
|
122
|
+
var unfixedXPos:Number = curToolTip.x;
|
123
|
+
if(curToolTip.x + curToolTip.width + 10 > Application.application.stage.stageWidth)
|
124
|
+
{
|
125
|
+
curToolTip.x = Application.application.stage.stageWidth - 10 - curToolTip.width;
|
126
|
+
curToolTip.setStyle("pointerOffset", unfixedXPos - curToolTip.x + 2);
|
127
|
+
}
|
128
|
+
else if(curToolTip.x < 0)
|
129
|
+
{
|
130
|
+
curToolTip.x = 10;
|
131
|
+
curToolTip.setStyle("pointerOffset", unfixedXPos - curToolTip.x + 2);
|
132
|
+
}
|
133
|
+
var f:Fade = new Fade(curToolTip);
|
134
|
+
f.alphaFrom = 0.0;
|
135
|
+
f.alphaTo = 1.0;
|
136
|
+
f.duration = 100;
|
137
|
+
f.play();
|
138
|
+
}
|
139
|
+
}
|
140
|
+
}
|
141
|
+
protected static function handleTargetMouseOut(event:MouseEvent):void
|
142
|
+
{
|
143
|
+
if(curTipTarget)
|
144
|
+
{
|
145
|
+
curTipTarget.removeEventListener(MouseEvent.MOUSE_OUT, handleTargetMouseOut);
|
146
|
+
}
|
147
|
+
removeTip();
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
@@ -0,0 +1,245 @@
|
|
1
|
+
<?xml version = "1.0" encoding = "utf-8"?>
|
2
|
+
<mx:Canvas xmlns:mx = "http://www.adobe.com/2006/mxml"
|
3
|
+
visible = "false"
|
4
|
+
width = "242"
|
5
|
+
tabEnabled = "false"
|
6
|
+
styleName="transparentModal"
|
7
|
+
creationComplete = "init()">
|
8
|
+
<mx:Script>
|
9
|
+
<![CDATA[
|
10
|
+
import mx.controls.Alert;
|
11
|
+
import mx.core.Application;
|
12
|
+
import mx.managers.PopUpManager;
|
13
|
+
import mx.managers.PopUpManagerChildList;
|
14
|
+
private const ARROW_SPACING_H:int = 9;
|
15
|
+
private const PADDING_H:int = 8;
|
16
|
+
private const SPACING_H:int = 5;
|
17
|
+
private const SPACING_V:int = 6;
|
18
|
+
private const MAX_CENTER_HEIGHT:int = 150;
|
19
|
+
[Bindable]
|
20
|
+
public var helpTitle:String = '';
|
21
|
+
[Bindable]
|
22
|
+
public var helpText:String = '';
|
23
|
+
public var target:DisplayObject;
|
24
|
+
public var showArrow:Boolean;
|
25
|
+
public var verticalAlign:int = -1;
|
26
|
+
public var horizontalAlign:int = -1;
|
27
|
+
private var resizeTimer:Timer;
|
28
|
+
public var continueFunction:Function;
|
29
|
+
public var stopFunction:Function;
|
30
|
+
private function init():void
|
31
|
+
{
|
32
|
+
//Timer waits until after bubble is resized to become visible
|
33
|
+
callLater(show);
|
34
|
+
//Listen to resize events if attached to an object
|
35
|
+
if(target != null)
|
36
|
+
{
|
37
|
+
target.stage.addEventListener(Event.RESIZE, onResize, false, 0, true);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
public override function setFocus():void
|
41
|
+
{
|
42
|
+
//Do nothing!
|
43
|
+
}
|
44
|
+
private function show():void
|
45
|
+
{
|
46
|
+
//If this is giving you an error, you need the latest version of flex sdk :(
|
47
|
+
//http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3
|
48
|
+
this.visible = true;
|
49
|
+
}
|
50
|
+
public function position(centerHelp:Boolean = false):void
|
51
|
+
{
|
52
|
+
var center:Point;
|
53
|
+
var targetBounds:Rectangle;
|
54
|
+
if(target == null)
|
55
|
+
{
|
56
|
+
var _stage:Canvas = Application.application.canvasMainContainer;
|
57
|
+
x = _stage.width / 2 - width / 2;
|
58
|
+
y = _stage.height / 2 - height / 2 - 150;
|
59
|
+
return;
|
60
|
+
}
|
61
|
+
//Find what quadrant the target object is in
|
62
|
+
center = this.target.localToGlobal(new Point(target.width / 2, target.height / 2));
|
63
|
+
var targetPoint:Point = this.target.localToGlobal(new Point(0, 0));
|
64
|
+
targetBounds = new Rectangle(targetPoint.x, targetPoint.y, target.width, target.height);
|
65
|
+
var pos:Point = new Point();
|
66
|
+
//---------- find y position for bubble ----------
|
67
|
+
if ((verticalAlign == HelpObject.V_ALIGN_AUTO && center.y <= screen.height / 2) ||
|
68
|
+
verticalAlign == HelpObject.V_ALIGN_BOTTOM) // for components on top half of screen
|
69
|
+
{
|
70
|
+
pos.y = targetBounds.y - SPACING_V;
|
71
|
+
positionArrowV('top');
|
72
|
+
}
|
73
|
+
else // for components on bottom half of screen
|
74
|
+
{
|
75
|
+
this.validateNow(); //needed for this.height to return accurate measure
|
76
|
+
pos.y = targetBounds.y + targetBounds.height - this.height + SPACING_V;
|
77
|
+
positionArrowV('bottom');
|
78
|
+
}
|
79
|
+
//---------- find x position for bubble ----------
|
80
|
+
if ((horizontalAlign == HelpObject.H_ALIGN_AUTO && center.x <= screen.width / 2) ||
|
81
|
+
horizontalAlign == HelpObject.H_ALIGN_RIGHT) //components on left
|
82
|
+
{
|
83
|
+
pos.x = targetBounds.x + targetBounds.width + SPACING_H;
|
84
|
+
positionArrowH(true);
|
85
|
+
}
|
86
|
+
else //components on right
|
87
|
+
{
|
88
|
+
pos.x = targetBounds.x - this.width - SPACING_H;
|
89
|
+
positionArrowH(false);
|
90
|
+
}
|
91
|
+
//Validate x-position
|
92
|
+
if(pos.x < 0)
|
93
|
+
{
|
94
|
+
pos.x = 0;
|
95
|
+
}
|
96
|
+
//Validate y-position
|
97
|
+
if(pos.y < 0)
|
98
|
+
{
|
99
|
+
pos.y = 0;
|
100
|
+
}
|
101
|
+
move(pos.x, pos.y);
|
102
|
+
}
|
103
|
+
private function positionArrowH(left:Boolean):void
|
104
|
+
{
|
105
|
+
arrowLeft.visible = showArrow && left;
|
106
|
+
arrowRight.visible = showArrow && !left;
|
107
|
+
}
|
108
|
+
private function positionArrowV(position:String):void
|
109
|
+
{
|
110
|
+
if(position == 'top')
|
111
|
+
{
|
112
|
+
arrowLeft.setStyle('top', ARROW_SPACING_H);
|
113
|
+
arrowLeft.setStyle('bottom', null);
|
114
|
+
arrowRight.setStyle('top', ARROW_SPACING_H);
|
115
|
+
arrowRight.setStyle('bottom', null);
|
116
|
+
}
|
117
|
+
else if(position == 'bottom')
|
118
|
+
{
|
119
|
+
arrowLeft.setStyle('top', null);
|
120
|
+
arrowLeft.setStyle('bottom', ARROW_SPACING_H);
|
121
|
+
arrowRight.setStyle('top', null);
|
122
|
+
arrowRight.setStyle('bottom', ARROW_SPACING_H);
|
123
|
+
}
|
124
|
+
else if(position == 'center')
|
125
|
+
{
|
126
|
+
}
|
127
|
+
}
|
128
|
+
public static function create(helpObject:HelpObject, stopFunction:Function = null, continueFunction:Function = null, visibleModalBackground:Boolean = false):HelpBubble
|
129
|
+
{
|
130
|
+
//Create and Initialize popup
|
131
|
+
var popup:HelpBubble = new HelpBubble();
|
132
|
+
if(visibleModalBackground)
|
133
|
+
{
|
134
|
+
popup.styleName = '';
|
135
|
+
}
|
136
|
+
popup.target = helpObject.targetComponent;
|
137
|
+
popup.continueFunction = (continueFunction == null)? stopFunction:continueFunction;
|
138
|
+
popup.stopFunction = stopFunction;
|
139
|
+
popup.showArrow = helpObject.showArrow;
|
140
|
+
popup.verticalAlign= helpObject.verticalAlign;
|
141
|
+
popup.horizontalAlign = helpObject.horizontalAlign;
|
142
|
+
popup.width = helpObject.width;
|
143
|
+
//Display popup using popup manager
|
144
|
+
PopUpManager.addPopUp(popup, DisplayObject(Application.application), true,
|
145
|
+
PopUpManagerChildList.POPUP);
|
146
|
+
//Update popup information and position (we do it after it appears so size updates properly)
|
147
|
+
popup.helpText = helpObject.message;
|
148
|
+
popup.helpTitle = helpObject.title;
|
149
|
+
popup.position(helpObject.horizontalAlign == HelpObject.V_ALIGN_CENTER);
|
150
|
+
//Hide continue button if there is no continue function
|
151
|
+
if(continueFunction == null)
|
152
|
+
{
|
153
|
+
popup.btnContinue.visible = false;
|
154
|
+
popup.btnDismiss.label = "Close";
|
155
|
+
}
|
156
|
+
return popup;
|
157
|
+
}
|
158
|
+
/**
|
159
|
+
* called whenever resize event is fired.
|
160
|
+
* this function is combined with a timer to avoid excessive
|
161
|
+
* repositioning and to add a small delay that is needed for
|
162
|
+
* the maximize resize event to work properly
|
163
|
+
*/
|
164
|
+
private function onResize(event:Event):void
|
165
|
+
{
|
166
|
+
//Create resize timer if not created yet
|
167
|
+
if(resizeTimer == null)
|
168
|
+
{
|
169
|
+
resizeTimer = new Timer(100, 1);
|
170
|
+
resizeTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onResizeUpdate);
|
171
|
+
}
|
172
|
+
//Only start timer if timer isn't already running
|
173
|
+
if(resizeTimer.running == false)
|
174
|
+
{
|
175
|
+
resizeTimer.start();
|
176
|
+
}
|
177
|
+
}
|
178
|
+
private function onResizeUpdate(event:Event):void
|
179
|
+
{
|
180
|
+
position();
|
181
|
+
}
|
182
|
+
private function onContinue():void
|
183
|
+
{
|
184
|
+
if(continueFunction != null)
|
185
|
+
{
|
186
|
+
continueFunction.call(this);
|
187
|
+
}
|
188
|
+
destroy();
|
189
|
+
}
|
190
|
+
private function onDismiss():void
|
191
|
+
{
|
192
|
+
if(continueFunction != null)
|
193
|
+
{
|
194
|
+
stopFunction.call(this);
|
195
|
+
}
|
196
|
+
destroy();
|
197
|
+
}
|
198
|
+
public function destroy():void
|
199
|
+
{
|
200
|
+
if(target != null)
|
201
|
+
{
|
202
|
+
if(target.stage != null && target.stage.hasEventListener(Event.RESIZE))
|
203
|
+
{
|
204
|
+
target.stage.removeEventListener(Event.RESIZE, onResize);
|
205
|
+
}
|
206
|
+
target = null;
|
207
|
+
}
|
208
|
+
if(resizeTimer != null)
|
209
|
+
{
|
210
|
+
if(resizeTimer.hasEventListener(TimerEvent.TIMER_COMPLETE))
|
211
|
+
{
|
212
|
+
resizeTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onResize);
|
213
|
+
}
|
214
|
+
resizeTimer = null;
|
215
|
+
}
|
216
|
+
PopUpManager.removePopUp(this);
|
217
|
+
}
|
218
|
+
]]>
|
219
|
+
</mx:Script>
|
220
|
+
<mx:Canvas id = "innerCanvas"
|
221
|
+
styleName = "helpBubble"
|
222
|
+
fontSize = "14"
|
223
|
+
fontFamily = "Arial"
|
224
|
+
left = "{PADDING_H}"
|
225
|
+
right = "{PADDING_H + 1}">
|
226
|
+
<mx:VBox id="vbContent" bottom = "45" top = "10" left = "10" right = "10">
|
227
|
+
<mx:Label fontFamily = "Arial Rounded MT Bold" fontWeight="normal" fontSize = "16" text = "{helpTitle}" color = "#393939" />
|
228
|
+
<mx:Text text = "{helpText}" selectable = "false" fontSize = "12" width = "100%" />
|
229
|
+
</mx:VBox>
|
230
|
+
<mx:LinkButton id="btnClose" styleName="popupButton" toolTip="close" click="{onDismiss()}" buttonMode="false" top="10" right="10">
|
231
|
+
<mx:icon>@Embed(source='/assets/materia/images/close-x.png')</mx:icon>
|
232
|
+
</mx:LinkButton>
|
233
|
+
<mx:LinkButton id="btnDismiss" styleName="popupButton" label="Dismiss Help" click="{onDismiss()}" visible="false" height="25" bottom="10" left="10"/>
|
234
|
+
<mx:LinkButton id="btnContinue" styleName="popupButton" label="Continue" click="{onContinue()}" fontSize="16" height="25" bottom="10" right="10" color="#14144C"/>
|
235
|
+
</mx:Canvas>
|
236
|
+
<mx:Image id = "arrowLeft" visible = "false" source = "@Embed(source='/assets/materia/swf/helpBubble.swf#leftArrow')" top="ARROW_SPACING_H"/>
|
237
|
+
<mx:Image id = "arrowRight"
|
238
|
+
visible = "false"
|
239
|
+
source = "@Embed(source='/assets/materia/swf/helpBubble.swf#rightArrow')"
|
240
|
+
bottom="ARROW_SPACING_H"
|
241
|
+
x = "{width - arrowLeft.width}" />
|
242
|
+
<mx:filters>
|
243
|
+
<mx:DropShadowFilter angle = "90" quality = "3" alpha = ".5" />
|
244
|
+
</mx:filters>
|
245
|
+
</mx:Canvas>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<mx:Image creationComplete="handleCreationComplete()" xmlns:mx="http://www.adobe.com/2006/mxml" width="13" height="13"
|
3
|
+
source="@Embed(source='/assets/materia/swf/kogneatoSymbols.swf#DarkHelpDot')">
|
4
|
+
<mx:Script>
|
5
|
+
<![CDATA[
|
6
|
+
import materia.toolTips.TipManager;
|
7
|
+
import mx.managers.ToolTipManager;
|
8
|
+
[Bindable]
|
9
|
+
public var toolTipOrientation:String = '';
|
10
|
+
public function handleCreationComplete():void
|
11
|
+
{
|
12
|
+
ToolTipManager.enabled = false;
|
13
|
+
addEventListener(MouseEvent.MOUSE_OVER, handleMouseOver, false, 0, true);
|
14
|
+
}
|
15
|
+
protected function handleMouseOver(event:MouseEvent):void
|
16
|
+
{
|
17
|
+
TipManager.showTip(this, toolTip, toolTipOrientation);
|
18
|
+
}
|
19
|
+
]]>
|
20
|
+
</mx:Script>
|
21
|
+
</mx:Image>
|
@@ -0,0 +1,92 @@
|
|
1
|
+
package materia.help
|
2
|
+
{
|
3
|
+
import mx.core.Application;
|
4
|
+
import mx.core.UIComponent;
|
5
|
+
public class HelpManager
|
6
|
+
{
|
7
|
+
private const DISMISS_MESSAGE_ID:String = "DissmissMessage";
|
8
|
+
private static var _instance:HelpManager;
|
9
|
+
private static var _kogneato:Application;
|
10
|
+
private var _targetScreen:UIComponent;
|
11
|
+
private var _helpSequence:Array;
|
12
|
+
private var _helpStep:int;
|
13
|
+
private var _continueFunction:Function;
|
14
|
+
private var _stopFunction:Function;
|
15
|
+
private var _currentBubble:HelpBubble;
|
16
|
+
public function HelpManager(targetScreen:UIComponent, helpSequence:Array, continueFunction:Function = null, stopFunction:Function = null)
|
17
|
+
{
|
18
|
+
_targetScreen = targetScreen;
|
19
|
+
_helpSequence = helpSequence;
|
20
|
+
_continueFunction = (continueFunction == null)? continueTour:continueFunction;
|
21
|
+
_stopFunction = (stopFunction == null)? stopTour:stopFunction;
|
22
|
+
}
|
23
|
+
public static function init(targetScreen:UIComponent, helpSequence:Array, customContinueFunction:Function = null, customStopFunction:Function = null):void
|
24
|
+
{
|
25
|
+
if(_instance != null)
|
26
|
+
{
|
27
|
+
_instance.destroy();
|
28
|
+
}
|
29
|
+
_instance = new HelpManager(targetScreen, helpSequence, customContinueFunction, customStopFunction);
|
30
|
+
_instance.beginTour();
|
31
|
+
}
|
32
|
+
public function beginTour():void
|
33
|
+
{
|
34
|
+
_helpStep = 0;
|
35
|
+
continueTour();
|
36
|
+
}
|
37
|
+
public function continueTour():void
|
38
|
+
{
|
39
|
+
//Avoid stepping out of range of the help sequence array
|
40
|
+
if(_helpStep >= _helpSequence.length)
|
41
|
+
{
|
42
|
+
onTourForPageComplete();
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
//Create the bubble and increment the step
|
46
|
+
_currentBubble = HelpBubble.create(HelpObject(_helpSequence[_helpStep]), _stopFunction, _continueFunction);
|
47
|
+
//Actions to take for the last bubble on this page
|
48
|
+
if(_helpStep == _helpSequence.length - 1)
|
49
|
+
{
|
50
|
+
// if(_kogneato.helpStep < _kogneato.numPagesInTour - 1)
|
51
|
+
// {
|
52
|
+
// _currentBubble.btnContinue.label = "Next Page";
|
53
|
+
// }
|
54
|
+
// else
|
55
|
+
// {
|
56
|
+
// _currentBubble.btnContinue.label = "Finish";
|
57
|
+
// }
|
58
|
+
}
|
59
|
+
_helpStep++;
|
60
|
+
}
|
61
|
+
public function onTourForPageComplete():void
|
62
|
+
{
|
63
|
+
// _kogneato.continueTour();
|
64
|
+
}
|
65
|
+
public function stopTour():void
|
66
|
+
{
|
67
|
+
_currentBubble = null;
|
68
|
+
//Save preference to dismiss help for this page
|
69
|
+
_helpStep = _helpSequence.length;
|
70
|
+
}
|
71
|
+
public function destroy():void
|
72
|
+
{
|
73
|
+
if(_currentBubble != null)
|
74
|
+
{
|
75
|
+
_currentBubble.destroy();
|
76
|
+
_currentBubble = null;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
public static function setKogneatoReference(kogneato:Application):void
|
80
|
+
{
|
81
|
+
_kogneato = kogneato;
|
82
|
+
}
|
83
|
+
public static function clear():void
|
84
|
+
{
|
85
|
+
if(_instance != null)
|
86
|
+
{
|
87
|
+
_instance.destroy();
|
88
|
+
_instance = null;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|