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,385 @@
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
2
|
+
package nm.ui
|
3
|
+
{
|
4
|
+
import flash.display.DisplayObject;
|
5
|
+
import flash.display.DisplayObjectContainer;
|
6
|
+
import flash.display.MovieClip;
|
7
|
+
import flash.events.Event;
|
8
|
+
import flash.events.FocusEvent;
|
9
|
+
import flash.events.MouseEvent;
|
10
|
+
import flash.geom.Point;
|
11
|
+
import flash.geom.Rectangle;
|
12
|
+
import flash.text.TextField;
|
13
|
+
import flash.text.TextFieldAutoSize;
|
14
|
+
import flash.text.TextFormat;
|
15
|
+
/**
|
16
|
+
* Base Class for the Window Component
|
17
|
+
* @author Jacob Bates, Ian Turgeon 02-13-06 NewMedia - CDWS - University of Central Florida newmedia.cdws.ucf.edu
|
18
|
+
*/
|
19
|
+
public class Window_base extends Component {
|
20
|
+
private var modal:Boolean; //Does window disable everything below it?
|
21
|
+
private var modalTarg:DisplayObjectContainer; //The size and location of BG is determined by this
|
22
|
+
private var movable:Boolean; //Is the window movable?
|
23
|
+
private var titleTF:TextField; //Textfield for titlebar
|
24
|
+
private var titleText:String; //Text of title bar
|
25
|
+
private var windowX:Number
|
26
|
+
private var windowY:Number
|
27
|
+
private var centerX:Boolean
|
28
|
+
private var centerY:Boolean
|
29
|
+
protected var bg:MovieClip = null; //Reference to background
|
30
|
+
protected var windowBg:MovieClip;
|
31
|
+
protected var windowFr:MovieClip //Reference to the body of the window
|
32
|
+
protected var titleBar:MovieClip; //Reference to title bar
|
33
|
+
public var content:MovieClip
|
34
|
+
public var window:MovieClip; //Reference to window itself
|
35
|
+
public var modalHeight:Number
|
36
|
+
public var modalWidth:Number
|
37
|
+
/**
|
38
|
+
* Create a Window extending the Component Class
|
39
|
+
*
|
40
|
+
* @usage var x:Window = Window.create(this, Window, 'myWindow', 0, [x, y, w, h, title, ismodal, isMovable])
|
41
|
+
* @param x Number x location of the window. Set to NaN to autoCenter the window in it's modalTarg
|
42
|
+
* @param y Number y location of the window. Set to NaN to autoCenter the window in it's modalTarg
|
43
|
+
* @param w Number width of the window
|
44
|
+
* @param h Number height of the window
|
45
|
+
* @param title String title to put on the title bar
|
46
|
+
* @param centered Boolean decides whether or not the window will be centered
|
47
|
+
* @param isModal Boolean[optional, default false] makes the window block out the stage behind the window
|
48
|
+
* @param isMovable Boolean[optional, default true] makes the window movable by grabbing the title bar
|
49
|
+
*/
|
50
|
+
function Window_base(tx:Number = NaN, ty:Number = NaN, w:Number = 200, h:Number = 100, title:String = "", isModal:Boolean = false, isMovable:Boolean = false){
|
51
|
+
super(true) // x & y are strange because of the background blocking screen
|
52
|
+
//Set up variables
|
53
|
+
centerX = isNaN(tx);
|
54
|
+
centerY = isNaN(ty);
|
55
|
+
windowX = tx;
|
56
|
+
windowY = ty;
|
57
|
+
_width = w;
|
58
|
+
_height = h;
|
59
|
+
modal = isModal; //Modal defaults to false
|
60
|
+
movable = isMovable == false ? false : true; //Movable defaults to false
|
61
|
+
titleText = title;
|
62
|
+
}
|
63
|
+
/**
|
64
|
+
* Default styles setup
|
65
|
+
*/
|
66
|
+
protected override function styleDefaults():void{
|
67
|
+
super.styleDefaults()
|
68
|
+
setStyle('borderSpacing', 10); // padding from the edges of the window
|
69
|
+
setStyle('borderStroke', 1);// title bar Frame size
|
70
|
+
setStyle('titleBarHeight', 20); // Title Bar Height
|
71
|
+
setStyle('titleFormat', new TextFormat("Arial", 12, 0xFFFFFF, true));
|
72
|
+
setStyle('titleEmbedFonts', false);
|
73
|
+
}
|
74
|
+
/****** GUI Drawing Functions *******/
|
75
|
+
/**
|
76
|
+
* draw the window, creating movieclips and all
|
77
|
+
*/
|
78
|
+
public override function draw():void {
|
79
|
+
super.draw();
|
80
|
+
//Set modal properties
|
81
|
+
modalTarg = modal ? DisplayObjectContainer(root) : DisplayObjectContainer(this.parent);
|
82
|
+
// create clips
|
83
|
+
window = new MovieClip();//createEmptyMovieClip("window", -4);
|
84
|
+
addChild(window);
|
85
|
+
//window.createEmptyMovieClip('bg', 0);
|
86
|
+
windowBg = new MovieClip(); // changed window.bg to windowBg
|
87
|
+
window.addChild(windowBg);
|
88
|
+
windowFr = new MovieClip();//window.createEmptyMovieClip("frame", 5); // TODO: do we need this? cant we draw this on window
|
89
|
+
window.addChild(windowFr);
|
90
|
+
//content = window.createEmptyMovieClip('content', 10); //Set new reference for Content
|
91
|
+
content = new MovieClip();
|
92
|
+
window.addChild(content);
|
93
|
+
titleBar = new MovieClip()//window.createEmptyMovieClip("tBar", 15);
|
94
|
+
window.addChild(titleBar);
|
95
|
+
//titleTF = titleBar.createTextField("tText", 1, getStyle('borderStroke')+3, 0, width-(getStyle('borderStroke')*2), 20);
|
96
|
+
titleTF = new TextField();
|
97
|
+
titleTF.x = getStyle('borderStroke')+3;
|
98
|
+
titleTF.y = 0;
|
99
|
+
titleTF.width = width-(getStyle('borderStroke')*2);
|
100
|
+
titleTF.height = 20;
|
101
|
+
titleBar.addChild(titleTF);
|
102
|
+
titleTF.selectable = false;
|
103
|
+
titleTF.setTextFormat(getStyle('titleFormat'));
|
104
|
+
titleTF.embedFonts = getStyle('titleEmbedFonts');
|
105
|
+
//windowFr.onRelease = function(){/*empty*/}; //block everything below the window (doesn't block everything, though)
|
106
|
+
//windowFr.addEventListener(MouseEvent.MOUSE_UP, function(e:MouseEvent){} );
|
107
|
+
windowFr.useHandCursor = false;
|
108
|
+
//EventMC.init(window.bg, [1,4])
|
109
|
+
//windowBg.useHandCursor = false
|
110
|
+
//bg.useHandCursor = false;
|
111
|
+
//window.bg.addEventListener('press', this, 'announceFocus');
|
112
|
+
//window.bg.addEventListener('rollOver', this, 'announceOver');
|
113
|
+
redraw();
|
114
|
+
}
|
115
|
+
/**
|
116
|
+
* Redraw the window with as little work as possible
|
117
|
+
*
|
118
|
+
* @usage myWindow.redraw();
|
119
|
+
*/
|
120
|
+
public override function redraw():void
|
121
|
+
{
|
122
|
+
//this._width = contentWidth + 2*getStyle('borderSpacing');
|
123
|
+
if(modal) mkBg();
|
124
|
+
else if(bg != null)
|
125
|
+
{
|
126
|
+
//bg.removeMovieClip();
|
127
|
+
removeChild(bg);
|
128
|
+
bg = null;
|
129
|
+
}
|
130
|
+
drawTitleBar();
|
131
|
+
if(movable) movableTitleBar();//Set up the title bar to move
|
132
|
+
//else titleBar.removeAllEventListeners(this); // this might be important
|
133
|
+
titleTF.text = titleText;
|
134
|
+
titleTF.setTextFormat(getStyle('titleFormat'));
|
135
|
+
titleTF.autoSize = TextFieldAutoSize.LEFT;
|
136
|
+
titleTF.y = getStyle('borderStroke')+((getStyle('titleBarHeight')-titleTF.height)/2); //Center text vertically
|
137
|
+
content.y = getStyle('borderStroke') + getStyle('borderSpacing') + getStyle('titleBarHeight')
|
138
|
+
content.x = getStyle('borderSpacing');
|
139
|
+
drawBody();
|
140
|
+
// auto center the window if it has a modal target AND we recieved an unknown for x y location
|
141
|
+
if (bg)
|
142
|
+
{
|
143
|
+
if(centerX) windowX = (bg.width - width) / 2;
|
144
|
+
if(centerY) windowY = (bg.height - height)/2;
|
145
|
+
}
|
146
|
+
// set location
|
147
|
+
this._x = windowX;
|
148
|
+
this._y = windowY;
|
149
|
+
}
|
150
|
+
/*
|
151
|
+
* removing the window
|
152
|
+
*/
|
153
|
+
public function removeWindow():void
|
154
|
+
{
|
155
|
+
removeChild(bg);
|
156
|
+
bg = null;
|
157
|
+
}
|
158
|
+
protected override function onAddedToStage(e:Event):void
|
159
|
+
{
|
160
|
+
super.onAddedToStage(e);
|
161
|
+
stage.addEventListener(Event.RESIZE, onResize,false, 0, true);
|
162
|
+
}
|
163
|
+
protected override function onRemovedFromStage(e:Event):void
|
164
|
+
{
|
165
|
+
stage.removeEventListener(Event.RESIZE, onResize);
|
166
|
+
super.onRemovedFromStage(e);
|
167
|
+
}
|
168
|
+
private function onResize(e:Event):void
|
169
|
+
{
|
170
|
+
redraw();
|
171
|
+
//bg.width = stage.stageWidth;
|
172
|
+
//bg.height = stage.stageHeight;
|
173
|
+
}
|
174
|
+
/**
|
175
|
+
* Drawing function for the Body
|
176
|
+
* You would typically extend this function
|
177
|
+
*/
|
178
|
+
protected function drawBody():void
|
179
|
+
{
|
180
|
+
windowBg.graphics.clear()
|
181
|
+
windowFr.graphics.clear();
|
182
|
+
}
|
183
|
+
/**
|
184
|
+
* Draw the Title Bar
|
185
|
+
* You would typically extend this function
|
186
|
+
*/
|
187
|
+
protected function drawTitleBar():void
|
188
|
+
{
|
189
|
+
titleBar.graphics.clear()
|
190
|
+
}
|
191
|
+
/**
|
192
|
+
* Draw the Backgrouund (the background is the blocking modal window)
|
193
|
+
* You would typically extend this function
|
194
|
+
*/
|
195
|
+
protected function drawBg():void{
|
196
|
+
bg.graphics.clear();
|
197
|
+
}
|
198
|
+
/****** GUI Creation *********/
|
199
|
+
/**
|
200
|
+
* Draw and set up the modal background (the background is the blocking modal window)
|
201
|
+
*/
|
202
|
+
private function mkBg(e:Event = null):void{
|
203
|
+
if(bg == null){
|
204
|
+
bg = new MovieClip();
|
205
|
+
bg.useHandCursor = false;
|
206
|
+
addChild(bg);
|
207
|
+
setChildIndex(bg, 0);
|
208
|
+
}
|
209
|
+
drawBg();
|
210
|
+
positionBg();
|
211
|
+
}
|
212
|
+
/****** GUI Interaction ***********/
|
213
|
+
/*
|
214
|
+
* Title bar was pressed, figure out the bounding drag area and attach the window to the cursor
|
215
|
+
*/
|
216
|
+
private function titleBarPress(e:Event): void
|
217
|
+
{
|
218
|
+
if (modal)
|
219
|
+
{
|
220
|
+
//this.startDragWindow(bg.x, bg.y, bg.width, bg.height); // bg is on the parent movie clip
|
221
|
+
this.startDragWindow(-x, -y, root.width-width, root.height-height)
|
222
|
+
}
|
223
|
+
else
|
224
|
+
{
|
225
|
+
var mypt:Point = new Point(0,0);
|
226
|
+
globalToLocal(mypt);
|
227
|
+
this.startDragWindow(mypt.x, mypt.y, root.width, root.height)
|
228
|
+
}
|
229
|
+
announceFocus(e)
|
230
|
+
}
|
231
|
+
public function startDragWindow(x:Number,y:Number,w:Number,h:Number):void {
|
232
|
+
//var r:Rectangle = new Rectangle(0, 0, stage.width-window.width, stage.height-window.height);// x - (width - getStyle('titleBarHeight')), y, w + x - getStyle('titleBarHeight'), h + y - height + (height - getStyle('titleBarHeight')));
|
233
|
+
var r:Rectangle = new Rectangle(x, y, w, h);
|
234
|
+
window.startDrag(false,r);
|
235
|
+
}
|
236
|
+
/**
|
237
|
+
* Title bar released, drop the window where it is
|
238
|
+
*/
|
239
|
+
public function stopDragWindow(e:Event):void{
|
240
|
+
window.stopDrag();
|
241
|
+
}
|
242
|
+
/**
|
243
|
+
* listen to stage resize of stage to adjust the modal background
|
244
|
+
*/
|
245
|
+
//private function onResize(){
|
246
|
+
//positionBg()
|
247
|
+
//}
|
248
|
+
/********** UI Actions ****************/
|
249
|
+
/**
|
250
|
+
* Set the position of the background relative to the stage
|
251
|
+
*/
|
252
|
+
private function positionBg():void{
|
253
|
+
//var mypt:Point = new Point(0,0);// create a 0,0 point
|
254
|
+
//var rootbound:Boolean = (modalTarg == root)
|
255
|
+
//mypt = modalTarg.localToGlobal(mypt);// translate 0,0 to the modalTarget
|
256
|
+
//mypt = bg.globalToLocal(mypt);
|
257
|
+
bg.x = 0;//-x;// mypt.x;
|
258
|
+
bg.y = 0;//-y;// mypt.y;
|
259
|
+
}
|
260
|
+
/**
|
261
|
+
* Make the window movable by initializing the mouse interaction on the title bar
|
262
|
+
*/
|
263
|
+
private function movableTitleBar():void {
|
264
|
+
//EventMC.init(titleBar, [1,2,3,4]);
|
265
|
+
//titleBar.addEventListener('press', this, 'titleBarPress');
|
266
|
+
titleBar.addEventListener(MouseEvent.MOUSE_DOWN, titleBarPress);
|
267
|
+
//titleBar.addEventListener('release', this, 'stopDragWindow');
|
268
|
+
//titleBar.addEventListener('releaseOutside', this, 'stopDragWindow');
|
269
|
+
//titleBar.addEventListener(MouseEvent.MOUSE_UP, stopDragWindow);
|
270
|
+
stage.addEventListener(MouseEvent.MOUSE_UP, stopDragWindow);
|
271
|
+
//titleBar.addEventListener('rollOver', this, 'announceOver');
|
272
|
+
titleBar.addEventListener(MouseEvent.MOUSE_OVER, announceOver);
|
273
|
+
}
|
274
|
+
private function announceOver(e:Event):void{
|
275
|
+
//dispatchEvent({type:'over', target:this});
|
276
|
+
dispatchEvent(new MouseEvent(MouseEvent.ROLL_OVER));
|
277
|
+
}
|
278
|
+
private function announceFocus(e:Event):void{
|
279
|
+
//dispatchEvent({type:'focus', target:this});
|
280
|
+
dispatchEvent(new FocusEvent( FocusEvent.FOCUS_IN));
|
281
|
+
}
|
282
|
+
/********** GETTERS/SETTERS ****************/
|
283
|
+
public function set embedFont(val:Boolean):void{
|
284
|
+
titleTF.embedFonts = val;
|
285
|
+
titleTF.text = titleText;
|
286
|
+
}
|
287
|
+
public function get embedFont():Boolean {
|
288
|
+
return titleTF.embedFonts;
|
289
|
+
}
|
290
|
+
public function set _modalTarg(val:DisplayObjectContainer):void {
|
291
|
+
modalTarg = val;
|
292
|
+
mkBg();
|
293
|
+
}
|
294
|
+
public function get _modalTarg():DisplayObjectContainer {
|
295
|
+
return modalTarg;
|
296
|
+
}
|
297
|
+
public function set _x(val:Number):void {
|
298
|
+
windowX = val;
|
299
|
+
centerX = false;
|
300
|
+
if(window != null) { window.x = val; };
|
301
|
+
}
|
302
|
+
public function get _x():Number{
|
303
|
+
return window.x
|
304
|
+
}
|
305
|
+
public function set _y(val:Number):void {
|
306
|
+
windowY = val;
|
307
|
+
centerY = false;
|
308
|
+
if(window != null) { window.y = val; };
|
309
|
+
}
|
310
|
+
public function get _y():Number {
|
311
|
+
return window.y
|
312
|
+
}
|
313
|
+
/**
|
314
|
+
* define the content height to fit the window around
|
315
|
+
*
|
316
|
+
* @usage myWindow.contentHeight = 500
|
317
|
+
* @param val Number
|
318
|
+
*/
|
319
|
+
public function set contentHeight(val:Number):void {
|
320
|
+
if(val >= 0)
|
321
|
+
{
|
322
|
+
this.height = val + 2*(getStyle('borderSpacing') + 2*getStyle('borderStroke')) + getStyle('titleBarHeight');
|
323
|
+
redraw();
|
324
|
+
}
|
325
|
+
}
|
326
|
+
public function get contentHeight():Number{
|
327
|
+
return height - content.y - getStyle('borderSpacing') - getStyle('borderStroke')
|
328
|
+
}
|
329
|
+
public function set contentWidth(val:Number):void {
|
330
|
+
if(val >= 0){
|
331
|
+
this.width = val+2*(getStyle('borderSpacing'))
|
332
|
+
redraw();
|
333
|
+
}
|
334
|
+
}
|
335
|
+
public function get contentWidth():Number{
|
336
|
+
return width - content.x - getStyle('borderSpacing')
|
337
|
+
}
|
338
|
+
public function get isModal():Boolean{
|
339
|
+
return modal;
|
340
|
+
}
|
341
|
+
public function get title():String{
|
342
|
+
return titleTF.text;
|
343
|
+
}
|
344
|
+
public override function destroy():void
|
345
|
+
{
|
346
|
+
titleBar.removeEventListener(MouseEvent.MOUSE_DOWN, titleBarPress);
|
347
|
+
if(stage != null)
|
348
|
+
{
|
349
|
+
stage.removeEventListener(MouseEvent.MOUSE_UP, stopDragWindow);
|
350
|
+
}
|
351
|
+
titleBar.removeEventListener(MouseEvent.MOUSE_OVER, announceOver);
|
352
|
+
if(stage != null)
|
353
|
+
{
|
354
|
+
stage.removeEventListener(Event.RESIZE, onResize);
|
355
|
+
}
|
356
|
+
super.destroy();
|
357
|
+
}
|
358
|
+
/**
|
359
|
+
* Set the contents for this window. This is essentially a necessar function
|
360
|
+
* because the window will be empty without the contents that are set here.
|
361
|
+
* Any DisplayObject can be set here and it will assume the window background.
|
362
|
+
*/
|
363
|
+
public function setContent(contents:DisplayObject = null):void
|
364
|
+
{
|
365
|
+
//Remove previous content
|
366
|
+
for(var i:int = 0; i < content.numChildren; i++)
|
367
|
+
{
|
368
|
+
content.removeChildAt(i);
|
369
|
+
}
|
370
|
+
//Add new content
|
371
|
+
content.addChild(contents);
|
372
|
+
this._height = content.height + 2*(getStyle('borderSpacing') + 2*getStyle('borderStroke')) + getStyle('titleBarHeight');
|
373
|
+
this._width = content.width + 2*getStyle('borderSpacing');
|
374
|
+
redraw();
|
375
|
+
}
|
376
|
+
public function getContent():MovieClip
|
377
|
+
{
|
378
|
+
if(!content.numChildren)
|
379
|
+
{
|
380
|
+
setContent(new MovieClip());
|
381
|
+
}
|
382
|
+
return MovieClip(content.getChildAt(0));
|
383
|
+
}
|
384
|
+
}
|
385
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
2
|
+
package nm.ui.layout{
|
3
|
+
import flash.display.DisplayObject;
|
4
|
+
public class CenterScale{
|
5
|
+
public static function calc(maxHeight:Number, maxWidth:Number, currentHeight:Number, currentWidth:Number):Object{
|
6
|
+
// just in case the loaded image is too big
|
7
|
+
if(currentWidth > maxWidth){
|
8
|
+
currentWidth = currentHeight * (maxWidth/currentWidth )
|
9
|
+
currentWidth = maxWidth
|
10
|
+
}
|
11
|
+
if(currentHeight > maxHeight){
|
12
|
+
currentHeight = currentWidth * (maxHeight/currentHeight)
|
13
|
+
currentHeight = maxHeight;
|
14
|
+
}
|
15
|
+
return {H:currentHeight, W:currentWidth, X:(maxWidth - currentWidth)/2, Y:(maxHeight - currentHeight)/2};
|
16
|
+
}
|
17
|
+
public static function scale(obj:DisplayObject, maxHeight:Number, maxWidth:Number, centerX:Boolean = false, centerY:Boolean = false):DisplayObject
|
18
|
+
{
|
19
|
+
var centerObj:Object = calc(maxHeight, maxWidth, obj.height, obj.width);
|
20
|
+
obj.width = centerObj.W;
|
21
|
+
obj.height = centerObj.H;
|
22
|
+
if(centerX) obj.x = centerObj.X;
|
23
|
+
if(centerY) obj.y = centerObj.Y;
|
24
|
+
return obj;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,163 @@
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
2
|
+
package nm.ui.layout{
|
3
|
+
import com.gskinner.motion.GTween;
|
4
|
+
import flash.display.MovieClip;
|
5
|
+
import flash.events.Event;
|
6
|
+
import flash.events.FocusEvent;
|
7
|
+
import it.animation.TweenSingleton;
|
8
|
+
import it.animation.methods.Shake;
|
9
|
+
import nm.ui.Window;
|
10
|
+
public class WindowManager {
|
11
|
+
/**
|
12
|
+
* The heght used for modals (grayed out backgrounds) of displayed windows
|
13
|
+
*/
|
14
|
+
public var height:Number
|
15
|
+
/**
|
16
|
+
* The width used for modals (grayed out backgrounds) of displayed windows
|
17
|
+
*/
|
18
|
+
public var width:Number
|
19
|
+
protected var _windowStage:MovieClip;
|
20
|
+
protected var _windows:Array
|
21
|
+
protected var _topWindow:MovieClip
|
22
|
+
/**
|
23
|
+
* Creates a WindowManager with the given windowStage as a reference to which
|
24
|
+
* windows are added.
|
25
|
+
*
|
26
|
+
* @param windowStage The sprite to use as the base to which we will add windows
|
27
|
+
* @param height The height of the window manager and thus, any modals (grayed out backgrounds) of any given windows to show
|
28
|
+
* @param width The width of the window manager and thus, any modals of any given windows
|
29
|
+
*/
|
30
|
+
public function WindowManager(windowStage:MovieClip, height:Number=0, width:Number =0){
|
31
|
+
_windows = new Array()
|
32
|
+
_windowStage = windowStage;
|
33
|
+
this.height = windowStage.height
|
34
|
+
this.width = windowStage.width
|
35
|
+
if(height > 0) this.height = height
|
36
|
+
if(width > 0) this.width = width
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Adds a window to an existing window manager.
|
40
|
+
*
|
41
|
+
* @param window The window to add (see Window class)
|
42
|
+
* @param center Whether or not to center the window in the windowStage (see constructor)
|
43
|
+
*/
|
44
|
+
public function addWindow(window:MovieClip, center:Boolean):MovieClip
|
45
|
+
{
|
46
|
+
window.modalHeight = height
|
47
|
+
window.modalWidth = width
|
48
|
+
window.addEventListener(FocusEvent.FOCUS_IN, onFocus, false,0,true);
|
49
|
+
window.addEventListener('destroy', destroyWindow,false,0,true); // is this needed? it causes an infinite loop
|
50
|
+
_windows.push(window);
|
51
|
+
// if the previous top window was modal and this one isnt, make sure the previous is on top
|
52
|
+
_topWindow = window
|
53
|
+
_windowStage.addChild(window);
|
54
|
+
if(center) centerWindow(window);
|
55
|
+
return window;
|
56
|
+
}
|
57
|
+
/**
|
58
|
+
* Centers the given window in the given windowStage (see constructor)
|
59
|
+
*/
|
60
|
+
public function centerWindow(window:MovieClip):void{
|
61
|
+
window.x = (_windowStage.width - window.width)/2;
|
62
|
+
window.y = (_windowStage.height - window.height)/2;
|
63
|
+
}
|
64
|
+
/**
|
65
|
+
* Shakes the given window using a tween
|
66
|
+
*/
|
67
|
+
public function shakeWindow(window:MovieClip):void{
|
68
|
+
TweenSingleton.addTween(window, 'x', window.x, 8, 5, Shake.method);
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Removes the given window from the given windowStage (see constructor)
|
72
|
+
*/
|
73
|
+
public function rmWindow(window:MovieClip):MovieClip
|
74
|
+
{
|
75
|
+
if (window == null) return null; // this shouldn't be needed, but it fixes errors when reseting
|
76
|
+
if (_windowStage.contains(window))
|
77
|
+
{
|
78
|
+
window.removeEventListener(FocusEvent.FOCUS_IN, onFocus);
|
79
|
+
window.removeEventListener('destroy', destroyWindow);
|
80
|
+
window.destroy();
|
81
|
+
window.removeWindow();
|
82
|
+
// remove the reference from the array
|
83
|
+
_windows.splice(_windows.indexOf(window), 1);
|
84
|
+
_windowStage.removeChild(window);
|
85
|
+
//TODO: remove listeners
|
86
|
+
//windowRef.removeAllEventListeners();
|
87
|
+
//windowRef.removeMovieClip();
|
88
|
+
return window
|
89
|
+
}
|
90
|
+
return null;
|
91
|
+
}
|
92
|
+
/**
|
93
|
+
* Removes all windows from the given windowStage (see constructor)
|
94
|
+
*/
|
95
|
+
public function clearWindows():void{
|
96
|
+
for each(var i:MovieClip in _windows) rmWindow(i);
|
97
|
+
}
|
98
|
+
/**
|
99
|
+
* Returns a reference to a window by searching for it by its title
|
100
|
+
*/
|
101
|
+
public function findByTitle(title:String):MovieClip {
|
102
|
+
for(var i:String in _windows){
|
103
|
+
if(_windows[i].title == title) return _windows[i];
|
104
|
+
}
|
105
|
+
return null;
|
106
|
+
}
|
107
|
+
/**
|
108
|
+
* Returns a reference to the window that is on top
|
109
|
+
*/
|
110
|
+
public function get topWindow():MovieClip {
|
111
|
+
_topWindow = MovieClip(_windowStage.getChildAt(_windowStage.numChildren-1));
|
112
|
+
return _topWindow;
|
113
|
+
}
|
114
|
+
/**
|
115
|
+
* Move the given window to the top
|
116
|
+
*/
|
117
|
+
public function set topWindow(window:MovieClip):void{
|
118
|
+
_toFront(window)
|
119
|
+
}
|
120
|
+
/**
|
121
|
+
* Deletes the window manager and its references to all windows
|
122
|
+
*/
|
123
|
+
public function destroy():void
|
124
|
+
{
|
125
|
+
_windows = null;
|
126
|
+
_windowStage = null;
|
127
|
+
}
|
128
|
+
/**
|
129
|
+
* @private
|
130
|
+
* Moves the given window to the front
|
131
|
+
*/
|
132
|
+
protected function _toFront(window:MovieClip):void{
|
133
|
+
// if the window is on the controlled window stage, bring it to the front
|
134
|
+
_windowStage.setChildIndex(window,_windowStage.numChildren-1);
|
135
|
+
}
|
136
|
+
/**
|
137
|
+
* @private
|
138
|
+
* Removes the given window from the windowStage
|
139
|
+
*/
|
140
|
+
private function destroyWindow(e:Event):void
|
141
|
+
{
|
142
|
+
rmWindow(MovieClip(e.target));
|
143
|
+
}
|
144
|
+
/*
|
145
|
+
* TODO: add over focus to window
|
146
|
+
private function onOver(event:Object){
|
147
|
+
////trace('over ')
|
148
|
+
}
|
149
|
+
*/
|
150
|
+
/**
|
151
|
+
* @private
|
152
|
+
* Called when a window receives focus.
|
153
|
+
* Moves the window with focus to the front
|
154
|
+
*/
|
155
|
+
private function onFocus(e:FocusEvent):void{
|
156
|
+
var t:* = e.target;
|
157
|
+
while(t.parent != _windowStage){ // get the window clip
|
158
|
+
t = t.parent;
|
159
|
+
}
|
160
|
+
_toFront(MovieClip(t))
|
161
|
+
}
|
162
|
+
}
|
163
|
+
}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
2
|
+
package nm.ui.layout{
|
3
|
+
import flash.display.MovieClip;
|
4
|
+
import flash.display.Sprite;
|
5
|
+
import flash.events.FocusEvent;
|
6
|
+
import it.animation.TweenSingleton;
|
7
|
+
import it.animation.methods.Shake;
|
8
|
+
public class WindowStage extends MovieClip{
|
9
|
+
protected var _windowStage:MovieClip;
|
10
|
+
protected var _windows:Array
|
11
|
+
protected var _topWindow:MovieClip
|
12
|
+
protected var stageWidth:Number, stageHeight:Number;
|
13
|
+
public function WindowStage(wid:Number, high:Number){
|
14
|
+
_windows = new Array()
|
15
|
+
//width = wid; height = high;
|
16
|
+
x=0; y=0;
|
17
|
+
}
|
18
|
+
public function addWindow(window:MovieClip, center:Boolean):MovieClip{
|
19
|
+
// TODO: add an event to the window
|
20
|
+
//nWindow.addEventListener('over', this, 'onOver')
|
21
|
+
//nWindow.addEventListener('focus', this, 'onFocus')
|
22
|
+
window.addEventListener(FocusEvent.FOCUS_IN,onFocus);
|
23
|
+
_windows.push(window);
|
24
|
+
// if the previous top window was modal and this one isnt, make sure the previous is on top
|
25
|
+
_topWindow = window
|
26
|
+
addChild(window);
|
27
|
+
if(center) centerWindow(window);
|
28
|
+
return window;
|
29
|
+
}
|
30
|
+
/*
|
31
|
+
* TODO: add over focus to window
|
32
|
+
private function onOver(event:Object){
|
33
|
+
////trace('over ')
|
34
|
+
}
|
35
|
+
*/
|
36
|
+
private function onFocus(e:FocusEvent):void
|
37
|
+
{
|
38
|
+
var t:* = e.target;
|
39
|
+
while( t.parent != this){ // get the window clip
|
40
|
+
t = t.parent;
|
41
|
+
}
|
42
|
+
_toFront(MovieClip(t))
|
43
|
+
}
|
44
|
+
protected function _toFront(window:MovieClip):void{
|
45
|
+
// if the window is on the controlled window stage, bring it to the front
|
46
|
+
this.setChildIndex(window,numChildren-1);
|
47
|
+
/*
|
48
|
+
if(contains(window)){
|
49
|
+
if(topWindow != window ){
|
50
|
+
swapChildren(window, topWindow)
|
51
|
+
_topWindow = window;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
*/
|
55
|
+
}
|
56
|
+
public function centerWindow(window:MovieClip):void{
|
57
|
+
//window.move((width - window.width)/2, (height - window.height)/2)
|
58
|
+
window.x = (width - window.width)/2;
|
59
|
+
window.y = (height - window.height)/2;
|
60
|
+
}
|
61
|
+
public function shakeWindow(window:MovieClip):void{
|
62
|
+
TweenSingleton.addTween(window, 'x', window.x, 12, 5, Shake.method);
|
63
|
+
}
|
64
|
+
public function rmWindow(window:MovieClip):MovieClip{
|
65
|
+
if(contains(window)){
|
66
|
+
window.removeWindow();
|
67
|
+
removeChild(window);
|
68
|
+
// remove the reference from the array
|
69
|
+
_windows.splice(_windows.indexOf(window), 1);
|
70
|
+
//TODO: remove listeners
|
71
|
+
//windowRef.removeAllEventListeners();
|
72
|
+
//windowRef.removeMovieClip();
|
73
|
+
return window
|
74
|
+
}
|
75
|
+
return null;
|
76
|
+
}
|
77
|
+
public function clearWindows():void
|
78
|
+
{
|
79
|
+
////trace("windows: "+_windows);
|
80
|
+
for each(var i:MovieClip in _windows) rmWindow(i);
|
81
|
+
}
|
82
|
+
public function findByTitle(title:String):MovieClip{
|
83
|
+
for(var i:String in _windows){
|
84
|
+
if(_windows[i].title == title) return _windows[i];
|
85
|
+
}
|
86
|
+
return null;
|
87
|
+
}
|
88
|
+
public function get topWindow():MovieClip{
|
89
|
+
_topWindow = MovieClip(getChildAt(numChildren-1));
|
90
|
+
return _topWindow;
|
91
|
+
}
|
92
|
+
public function set topWindow(window:MovieClip):void{
|
93
|
+
_toFront(window)
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|