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,644 @@
|
|
1
|
+
/* See the file "LICENSE.txt" for the full license governing this code. */
|
2
|
+
package nm.ui
|
3
|
+
{
|
4
|
+
import flash.display.MovieClip;
|
5
|
+
import flash.display.Sprite;
|
6
|
+
import flash.events.Event;
|
7
|
+
import flash.events.MouseEvent;
|
8
|
+
import flash.text.TextField;
|
9
|
+
import flash.text.TextFormat;
|
10
|
+
import flash.utils.*;
|
11
|
+
import nm.util.BitField;
|
12
|
+
import org.rubyamf.remoting.ssr.ResultEvent;
|
13
|
+
public class List_Base extends Component
|
14
|
+
{
|
15
|
+
//--------------------------------------------------------------------------
|
16
|
+
//
|
17
|
+
// Variables
|
18
|
+
//
|
19
|
+
//--------------------------------------------------------------------------
|
20
|
+
/**
|
21
|
+
* Determines if more than one item can be selected
|
22
|
+
*/
|
23
|
+
protected var _multiSelect:Boolean = false;
|
24
|
+
/**
|
25
|
+
* Determines if text field can be edited
|
26
|
+
*/
|
27
|
+
protected var _editable:Boolean = false;
|
28
|
+
/**
|
29
|
+
* The scroll position of the list
|
30
|
+
*/
|
31
|
+
protected var _scrollPos:int = 0;
|
32
|
+
/**
|
33
|
+
* Array of textfields that compose the list
|
34
|
+
*/
|
35
|
+
protected var _textFields:Array;
|
36
|
+
/**
|
37
|
+
* Array of elements that compose the list
|
38
|
+
*/
|
39
|
+
protected var _listItems:Array;
|
40
|
+
/**
|
41
|
+
* A graphic background
|
42
|
+
*/
|
43
|
+
protected var _bg:Sprite;
|
44
|
+
/**
|
45
|
+
* Container for teh textfields
|
46
|
+
*/
|
47
|
+
protected var _textFieldHolder:Sprite;
|
48
|
+
/**
|
49
|
+
* Index of the item that was last clicked
|
50
|
+
*/
|
51
|
+
protected var _lastClicked:int;
|
52
|
+
/**
|
53
|
+
* bitField that handles the selected items
|
54
|
+
*/
|
55
|
+
protected var _selected:BitField;
|
56
|
+
protected var _mouseAction:Boolean = false;
|
57
|
+
protected var _watchLabels:Boolean = false;
|
58
|
+
/**
|
59
|
+
* number of rows to show on the screen
|
60
|
+
*/
|
61
|
+
protected var _numShown:int;
|
62
|
+
/**
|
63
|
+
* scrollbar needed for scrolling
|
64
|
+
*/
|
65
|
+
protected var _sbar:ScrollBar;
|
66
|
+
/**
|
67
|
+
* item that is currently in hover state
|
68
|
+
*/
|
69
|
+
protected var _hover:int;
|
70
|
+
/**
|
71
|
+
* interval for updating values linked to an external array
|
72
|
+
*/
|
73
|
+
protected var _updateInterval:Number;
|
74
|
+
//--------------------------------------------------------------------------
|
75
|
+
//
|
76
|
+
// Constructor
|
77
|
+
//
|
78
|
+
//--------------------------------------------------------------------------
|
79
|
+
public function List_Base(width:Number, height:Number, multiSelect:Boolean = false)
|
80
|
+
{
|
81
|
+
super(false, width, height);
|
82
|
+
_multiSelect = multiSelect;
|
83
|
+
_textFields = new Array();
|
84
|
+
//_tfs.setArrangeStyle("relative", "items", 1);
|
85
|
+
_selected = new BitField();
|
86
|
+
_listItems = new Array();
|
87
|
+
_scrollPos = 0;
|
88
|
+
//tabChildren = false // dont allow flash tab control to select the textfields or scrollbar
|
89
|
+
_editable = false;
|
90
|
+
//Create main visual components
|
91
|
+
_bg = new MovieClip();
|
92
|
+
_textFieldHolder = new MovieClip();
|
93
|
+
}
|
94
|
+
//--------------------------------------------------------------------------
|
95
|
+
//
|
96
|
+
// Functions
|
97
|
+
//
|
98
|
+
//--------------------------------------------------------------------------
|
99
|
+
//----------------------------------
|
100
|
+
// Drawing
|
101
|
+
//----------------------------------
|
102
|
+
public override function draw():void
|
103
|
+
{
|
104
|
+
super.draw();
|
105
|
+
//Add Main Visual Components
|
106
|
+
addChild(_bg);
|
107
|
+
addChild(_textFieldHolder);
|
108
|
+
//_enabled = true;
|
109
|
+
_textFieldHolder.addEventListener(MouseEvent.MOUSE_MOVE, listMouseMove, false, 0, true);
|
110
|
+
_textFieldHolder.addEventListener(MouseEvent.ROLL_OVER, listOver, false, 0, true);
|
111
|
+
_textFieldHolder.addEventListener(MouseEvent.ROLL_OUT, listOut, false, 0, true);
|
112
|
+
_textFieldHolder.addEventListener(MouseEvent.MOUSE_UP, listRelease, false, 0, true);
|
113
|
+
_textFieldHolder.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel, false, 0, true);
|
114
|
+
//TODO: Need an event for doubleclick to link to 'listDoubleClick'
|
115
|
+
if(stage && _sbar) addChild(_sbar);
|
116
|
+
redraw();
|
117
|
+
}
|
118
|
+
/**
|
119
|
+
* Explict call to update the content of the list cells, use this if your setting values via dataProvider and watchLabels isnt updating the content.
|
120
|
+
* This call does not redraw the component, meerely update the contents
|
121
|
+
*/
|
122
|
+
public override function redraw():void
|
123
|
+
{
|
124
|
+
super.redraw();
|
125
|
+
//////trace("__________STAGE: " + stage + " " + _sbar.stage);
|
126
|
+
_numShown = Math.floor((height - 2*getStyle("borderWidth"))/getStyle("itemHeight")) // update numshown when we redraw
|
127
|
+
//////trace("Num Shown: " + getStyle("borderWidth"));
|
128
|
+
//if(_sbar) _sbar.linesPerPage = _numShown;
|
129
|
+
onScrollBarMove()
|
130
|
+
//_tfs_mc._x = _tfs_mc._y = getStyle("borderWidth") // move the textfields inside the border
|
131
|
+
refresh()
|
132
|
+
drawBg();
|
133
|
+
}
|
134
|
+
/**
|
135
|
+
* Explict call to update the content of the list cells, use this if your setting values via dataProvider and watchLabels isnt updating the content.
|
136
|
+
* This call does not redraw the component, meerely update the contents
|
137
|
+
*/
|
138
|
+
public function refresh():void
|
139
|
+
{
|
140
|
+
updateTextFieldCount()
|
141
|
+
updateTextFields()
|
142
|
+
checkForScroll()
|
143
|
+
}
|
144
|
+
/**
|
145
|
+
* Draws the background of the list, this method is ment to be extended
|
146
|
+
*/
|
147
|
+
protected function drawBg():void {}
|
148
|
+
/**
|
149
|
+
* Colorize the cell in its selected state, this method is ment to be extended
|
150
|
+
* @param index Number index of the cell to colorize
|
151
|
+
*/
|
152
|
+
protected function colorCellSelected(index:Number):void {}
|
153
|
+
/**
|
154
|
+
* Colorize the cell in its highlighted state, this method is ment to be extended
|
155
|
+
* @param index Number index of the cell to colorize
|
156
|
+
*/
|
157
|
+
protected function colorCellHighlight(index:Number):void {}
|
158
|
+
/**
|
159
|
+
* Colorize the cell in its rest state, this method is meant to be extended
|
160
|
+
* @param index Number index of the cell to colorize
|
161
|
+
*/
|
162
|
+
protected function colorCellRest(index:Number):void {}
|
163
|
+
//--------------------------------------------------------------------------
|
164
|
+
//
|
165
|
+
// MOUSE INTERACTION
|
166
|
+
//
|
167
|
+
//--------------------------------------------------------------------------
|
168
|
+
//listDoubleClick
|
169
|
+
//destroyEditBox
|
170
|
+
//checkForEditMouseOut
|
171
|
+
/**
|
172
|
+
* When mouse moves, this function is called
|
173
|
+
* @param e
|
174
|
+
*/
|
175
|
+
private function onMouseMove(e:Event):void {}
|
176
|
+
private function onMouseWheel(e:MouseEvent):void
|
177
|
+
{
|
178
|
+
if(e.delta > 0)
|
179
|
+
{
|
180
|
+
scrollUp();
|
181
|
+
}
|
182
|
+
else if(e.delta < 0)
|
183
|
+
{
|
184
|
+
scrollDown();
|
185
|
+
}
|
186
|
+
}
|
187
|
+
/**
|
188
|
+
* When mouse enters the list, called from Delegate for tfs_mc.
|
189
|
+
* Turn on mouse move listener and scroll wheel
|
190
|
+
*/
|
191
|
+
private function listOver(e:Event):void
|
192
|
+
{
|
193
|
+
//updateTextFields() // update the data displayed
|
194
|
+
_mouseAction = true
|
195
|
+
listMouseMove(e)
|
196
|
+
if(_sbar != null) _sbar.wheelEnabled = true;
|
197
|
+
}
|
198
|
+
/**
|
199
|
+
* When mouse leaves the list, called from Delegate for tfs_mc.
|
200
|
+
* Turn of mouse move listener, turn off wheel scrolling
|
201
|
+
*/
|
202
|
+
private function listOut(e:Event):void
|
203
|
+
{
|
204
|
+
_mouseAction = false; // turn off mouse interaction
|
205
|
+
if(_sbar != null) _sbar.wheelEnabled = false;
|
206
|
+
var element:int = _hover + _scrollPos;
|
207
|
+
if(_selected.isSet(element)) colorCellSelected(_hover)
|
208
|
+
else colorCellRest(_hover)
|
209
|
+
_hover = undefined;
|
210
|
+
}
|
211
|
+
/**
|
212
|
+
* When mouse up on the list, called from Delegate for tfs_mc.
|
213
|
+
* determine select/unselect with attention to shift and control keys
|
214
|
+
*/
|
215
|
+
private function listRelease(e:Event):void
|
216
|
+
{
|
217
|
+
//focused = true
|
218
|
+
var element:Number = _hover + _scrollPos
|
219
|
+
// if multi select allowed and user is holding control (Key.isDown does not work in AS3)
|
220
|
+
//if(Key.isDown(Key.CONTROL) && multiSelect) {
|
221
|
+
//if(selected.isSet(element)) deSelectItem(element);
|
222
|
+
//else selectItem(element);
|
223
|
+
//}
|
224
|
+
// if user is holding shift (Key.isDown does not work in AS3)
|
225
|
+
//else if(Key.isDown(Key.SHIFT) && _multiSelect) {
|
226
|
+
//if(elements[_lastClicked] != undefined) {
|
227
|
+
//var range = element - _lastClicked;
|
228
|
+
//if(element > _lastClicked) selectItem(_lastClicked + 1, Math.abs(element - _lastClicked));
|
229
|
+
//else selectItem(element, Math.abs(element - _lastClicked));
|
230
|
+
//}
|
231
|
+
//else selectItem(element);
|
232
|
+
//}
|
233
|
+
//else{
|
234
|
+
//deSelectAll()
|
235
|
+
selectItem(element);
|
236
|
+
//}
|
237
|
+
_lastClicked = element;
|
238
|
+
dispatchEvent(new ResultEvent("select", false, false, element));
|
239
|
+
}
|
240
|
+
/**
|
241
|
+
* When mouse moves while its over the list, assigned to this.onMouseMove by this.listOver.
|
242
|
+
* figure out which item the cursor is over and highlight it
|
243
|
+
*/
|
244
|
+
private function listMouseMove(e:Event):void
|
245
|
+
{
|
246
|
+
var itemHeight:Number = getStyle("itemHeight");
|
247
|
+
var adjustedMouseY:Number = mouseY - getStyle('borderWidth');
|
248
|
+
// figure out which item mouse is currently over
|
249
|
+
var curHover:int = (adjustedMouseY - (adjustedMouseY % itemHeight)) / itemHeight;
|
250
|
+
//////trace("Hovering: " + curHover, _hover);
|
251
|
+
// if we arent over the same item as before update the last cell's colors
|
252
|
+
if(curHover != _hover || (curHover == 0 && !_textFields[_hover].background))
|
253
|
+
{
|
254
|
+
//////trace(" Adjusting Hover Selection (" + curHover + ")");
|
255
|
+
//if(adjustedMouseY == _textFieldHolder.height) curHover -- // fixes problem with last item not selecting
|
256
|
+
var element:Number = _hover + _scrollPos
|
257
|
+
if(_selected.isSet(element)) colorCellSelected(_hover);
|
258
|
+
else colorCellRest(_hover);
|
259
|
+
_hover = curHover;
|
260
|
+
colorCellHighlight(_hover); // highlight the current cell
|
261
|
+
dispatchEvent(new ResultEvent("rollOver", false, false, _hover));
|
262
|
+
}
|
263
|
+
}
|
264
|
+
//******************* SCROLLING ***********************//
|
265
|
+
/**
|
266
|
+
* check for the need of a scroll bar, update the scrollbar and add/remove the scroll bar if it is needed or not
|
267
|
+
*/
|
268
|
+
private function checkForScroll():void
|
269
|
+
{
|
270
|
+
if(_listItems.length > _numShown)
|
271
|
+
{
|
272
|
+
if(_sbar == null)
|
273
|
+
{
|
274
|
+
_sbar = new ScrollBar();
|
275
|
+
addChild(_sbar);
|
276
|
+
//_sbar.draw();
|
277
|
+
//_sbar.focusable = false;
|
278
|
+
//////trace("NUM SHOWN: " + _numShown);
|
279
|
+
_sbar.linesPerPage = _numShown;
|
280
|
+
_sbar.addEventListener(ScrollBar_base.SCROLL, onScrollBarMove, false, 0, true);
|
281
|
+
_sbar.wheelEnabled = _mouseAction;
|
282
|
+
}
|
283
|
+
if(_sbar != null)
|
284
|
+
{
|
285
|
+
// if the scrollbar location isnt correct, update it and resize all the textfields
|
286
|
+
var bW:Number = getStyle("borderWidth");
|
287
|
+
var sB:Number = _sbar.getStyle("borderWidth");
|
288
|
+
if(_sbar.y != bW - sB) _sbar.y = bW - sB;
|
289
|
+
if(_sbar.x != width - _sbar.width - bW + sB) _sbar.x = width - _sbar.width - bW + sB;
|
290
|
+
_sbar.totalLines = _listItems.length; //update the length of the scrollbar
|
291
|
+
_sbar.scrollByLines = 1;
|
292
|
+
}
|
293
|
+
}
|
294
|
+
else if(_sbar != null)
|
295
|
+
{
|
296
|
+
removeChild(_sbar);
|
297
|
+
//_sbar.removeAllEventListeners();
|
298
|
+
_sbar = null;
|
299
|
+
}
|
300
|
+
resizeFields();
|
301
|
+
}
|
302
|
+
/**
|
303
|
+
* set the position of the current scroll, also fired by the scroll bar listener
|
304
|
+
*/
|
305
|
+
private function onScrollBarMove(...args):void
|
306
|
+
{
|
307
|
+
if(_sbar)
|
308
|
+
{
|
309
|
+
var oldpos:Number = _scrollPos
|
310
|
+
////trace(_scrollPos)
|
311
|
+
// if theres no scroll, set pos to 0
|
312
|
+
_scrollPos = (_sbar.scroll? Math.round((_listItems.length - _numShown) * _sbar.scroll / 100) : 0);
|
313
|
+
////trace((_sbar.scroll), Math.round((_listItems.length - _numShown) * _sbar.scroll / 100), oldpos)
|
314
|
+
if(_scrollPos != oldpos)
|
315
|
+
{
|
316
|
+
//destroyEditBox();
|
317
|
+
updateTextFields();
|
318
|
+
}
|
319
|
+
//updateTfs();
|
320
|
+
}
|
321
|
+
}
|
322
|
+
/**
|
323
|
+
* scroll up one position
|
324
|
+
*/
|
325
|
+
private function scrollUp():void
|
326
|
+
{
|
327
|
+
var pos:int = --_scrollPos >= 0 ? _scrollPos : 0
|
328
|
+
//_sbar.scroll = (_scrollPos * 100) / (_listItems.length - _numShown*2 + scroll + 1);
|
329
|
+
_sbar.scroll = (_scrollPos * 100) / (_listItems.length - _numShown);
|
330
|
+
updateTextFields();
|
331
|
+
}
|
332
|
+
/**
|
333
|
+
* scroll down one position
|
334
|
+
*/
|
335
|
+
private function scrollDown():void
|
336
|
+
{
|
337
|
+
var pos:Number = _scrollPos < _listItems.length - _numShown ? (_scrollPos+1) : _listItems.length - _numShown
|
338
|
+
_sbar.scroll = (pos * 100) / (_listItems.length - _numShown);
|
339
|
+
updateTextFields();
|
340
|
+
}
|
341
|
+
/**
|
342
|
+
* scroll to a specified position
|
343
|
+
* @param index Number position to move the scroll bar to
|
344
|
+
*/
|
345
|
+
public function scrollTo(index:Number):void
|
346
|
+
{
|
347
|
+
_sbar.scroll = Math.floor((index * 100) / (_listItems.length - _numShown));
|
348
|
+
}
|
349
|
+
//************************** PUBLIC METHODS ********************//
|
350
|
+
/**
|
351
|
+
* Set an item as selected (highlight and add to the selectedIndicies list). Optionaly set a length of items as selected using the second length argument.
|
352
|
+
* selectItem will operate according the myList.multiSelect, if multiSelect=true, selectItem will add to the list of items selected, if multiSelect = false,
|
353
|
+
* selectItem will unselect previous selections, selected only the new item. In the later case, if a run is given, only the last item in the run will be selected.
|
354
|
+
* @usage to select a single item: myList.selectItem(3); to select a run of items starting at index 3 to index 10: myList.selectItem(3, 8);
|
355
|
+
* @param index Number of the index to be selected
|
356
|
+
* @param length Number of the length of items to be selected, starting and index
|
357
|
+
*/
|
358
|
+
public function selectItem(index:Number, length:Number = NaN):void
|
359
|
+
{
|
360
|
+
//////trace('selecting ' + index)
|
361
|
+
// make sure the index is in range
|
362
|
+
if(index >= 0 && index < _listItems.length)
|
363
|
+
{
|
364
|
+
// if multiselect is false, remove all previous selections and only select the last item given
|
365
|
+
if(_multiSelect == false)
|
366
|
+
{
|
367
|
+
deSelectAll();
|
368
|
+
if(!isNaN(length)) index = index+length-1;
|
369
|
+
length = undefined
|
370
|
+
}
|
371
|
+
_selected.set(index, true, length);
|
372
|
+
if(length > 1) updateTextFields(); // update the whole dispaly
|
373
|
+
else updateTF(index-_scrollPos); // only update this one
|
374
|
+
}
|
375
|
+
}
|
376
|
+
/**
|
377
|
+
* Relocate an item from one index to another. The item to be moved will be removed from the list, then placed at the to index. If from < to, the item at to index will appear above the moved item,
|
378
|
+
* if from > to, the moved item will appear above the item previously at the to location.
|
379
|
+
* @param from Number index of the item you wish to move
|
380
|
+
* @param to Number index of the location you wish the item to be moved to
|
381
|
+
*/
|
382
|
+
public function moveItem(from:Number, to:Number):void
|
383
|
+
{
|
384
|
+
//Move selection:
|
385
|
+
var sel:Boolean = _selected.isSet(from);
|
386
|
+
//Move element:
|
387
|
+
var temp:ListItem = removeItem(from);
|
388
|
+
addItem(temp.label, temp.data, to);
|
389
|
+
}
|
390
|
+
/**
|
391
|
+
* Remove an item at a given index
|
392
|
+
* @param index Number index of the element to remove
|
393
|
+
* @param skipUpdate Boolean Optional (default false) to skip updating the screen
|
394
|
+
* @return
|
395
|
+
*/
|
396
|
+
public function removeItem(index:Number, skipUpdate:Boolean = false):ListItem
|
397
|
+
{
|
398
|
+
if(isNaN(index)) index = _listItems.length - 1;
|
399
|
+
if(_selected.isSet(index)) deSelectItem(index);
|
400
|
+
_selected.cut(index); // remove it's entry from the bitfield
|
401
|
+
if(_lastClicked == index) _lastClicked = undefined;
|
402
|
+
else if(_lastClicked > index) _lastClicked--;
|
403
|
+
var temp:ListItem = _listItems.splice(index, 1)[0];
|
404
|
+
if(_listItems.length < _numShown)
|
405
|
+
{
|
406
|
+
var tf:TextField = _textFields.splice(_listItems.length, 1)[0];
|
407
|
+
if(tf.parent) tf.parent.removeChild(tf);
|
408
|
+
drawBg();
|
409
|
+
}
|
410
|
+
if(skipUpdate != true)
|
411
|
+
{
|
412
|
+
onScrollBarMove();
|
413
|
+
if(_scrollPos < 1) updateTextFields(index-_scrollPos-1); // only do this in the case that the
|
414
|
+
checkForScroll();
|
415
|
+
}
|
416
|
+
return temp;
|
417
|
+
}
|
418
|
+
/**
|
419
|
+
* Remove all items and empty the list
|
420
|
+
*/
|
421
|
+
public function clear():void
|
422
|
+
{
|
423
|
+
if(_listItems.length > 0)
|
424
|
+
{
|
425
|
+
for(var i:String in _textFields) _textFields[i].removeTextField();
|
426
|
+
_textFields = new Array();
|
427
|
+
//_tfs = new ArrangeArray();
|
428
|
+
//_tfs.setArrangeStyle("relative", "items", 1);
|
429
|
+
//unWatchItems();
|
430
|
+
_listItems = new Array();
|
431
|
+
deSelectAll();
|
432
|
+
checkForScroll()
|
433
|
+
_scrollPos = 0;
|
434
|
+
dispatchEvent(new Event("change"));
|
435
|
+
}
|
436
|
+
}
|
437
|
+
/**
|
438
|
+
* unselect an item (un-highlight and remove from selectedIndicies list). Optionally deselect a length of items using the second length argument.
|
439
|
+
* @usage to unselect a single item: myList.unSelectItem(3); to unselect a run of items starting at index 3 to index 5: myList.unSelectItem(3, 3);
|
440
|
+
* @param indexSet Number of the index to be unselected
|
441
|
+
* @param length Number of the length of items to be selected, starting at index
|
442
|
+
*/
|
443
|
+
public function deSelectItem(index:Number, length:Number = 0):void
|
444
|
+
{
|
445
|
+
if(index >= 0 && index < _listItems.length){
|
446
|
+
if(length > 0) _selected.set(index, false, length)
|
447
|
+
else _selected.set(index, false);
|
448
|
+
}
|
449
|
+
}
|
450
|
+
/**
|
451
|
+
* unselect all of the items
|
452
|
+
*/
|
453
|
+
public function deSelectAll():void
|
454
|
+
{
|
455
|
+
_selected.clearAll();
|
456
|
+
for(var i:int = 0; i < _textFields.length; i++)
|
457
|
+
{
|
458
|
+
colorCellRest(i)
|
459
|
+
}
|
460
|
+
}
|
461
|
+
/**
|
462
|
+
* add an item to the list.
|
463
|
+
* @param label String to display in the list cell
|
464
|
+
* @param data Value of item.data for this cell
|
465
|
+
* @param index Number, Optional (default elements.length), indicating the location to insert the new item at
|
466
|
+
*/
|
467
|
+
public function addItem(label:String, data:* = null, index:Number = -1):void
|
468
|
+
{
|
469
|
+
var newElement:ListItem = new ListItem(label, data);
|
470
|
+
if(index < 0 || index > _listItems.length) index = _listItems.length;
|
471
|
+
if(index == _listItems.length) _listItems.push(newElement) //this is much faster than splice
|
472
|
+
else _listItems.splice(index, 0, newElement); //insert the item into elements
|
473
|
+
//_selected.insert(index, false); //this makes sure any items after this one stay selected
|
474
|
+
if(_lastClicked > index) _lastClicked++ //if last clicked is below this item, increment it to it points at the same item
|
475
|
+
//if(_pos > index) scrollUp(); //scroll up if we are below the new item
|
476
|
+
if(index < _scrollPos + _numShown) updateTextFields(index); //if the item is on screen or above, do this before updateTFC count to skip redundant tf updates
|
477
|
+
//watchItems(index); //notify watch items
|
478
|
+
updateTextFieldCount(); //may need to update the tf count
|
479
|
+
if(_sbar != null) checkForScroll(); //may also need to show the scroll bar
|
480
|
+
}
|
481
|
+
/**
|
482
|
+
* Update an item's label, data, and selected status
|
483
|
+
* @param index Number index of the item to update
|
484
|
+
* @param label String value for the list cell display
|
485
|
+
* @param data Value of the data
|
486
|
+
*/
|
487
|
+
public function updateItem(index:Number, label:String, data:*):void
|
488
|
+
{
|
489
|
+
_listItems[index] = new ListItem(label, data);
|
490
|
+
if(index >= _scrollPos && index < _scrollPos+_numShown) updateTF(index); // if the updated item is onscreen, update its textfield
|
491
|
+
}
|
492
|
+
/**
|
493
|
+
* return the element at a given index
|
494
|
+
* @param index Number of the index to get
|
495
|
+
* @return Object with object.label and object.data
|
496
|
+
*/
|
497
|
+
public function getItem(index:Number):Object
|
498
|
+
{
|
499
|
+
return _listItems[index];
|
500
|
+
}
|
501
|
+
/**
|
502
|
+
* Set the elements of the list to a precompiled set of values. The passed array is duplicated in an attempt to seperate the data from the passed values.
|
503
|
+
* @param values Array of objects with label and data members (or an array of strings/numbers to be used as a label)
|
504
|
+
*/
|
505
|
+
public function setValues(values:Array):void
|
506
|
+
{
|
507
|
+
clear(); // clear existing stuff
|
508
|
+
_listItems = new Array();
|
509
|
+
for(var i:* in values)
|
510
|
+
{
|
511
|
+
// duplicate the passed in array to seperate reference ties to the passed in array
|
512
|
+
_listItems[i] = (values[i] is Object ? new ListItem(values[i].label, values[i].data) : new ListItem(values[i].label))
|
513
|
+
}
|
514
|
+
_watchLabels = false // dont watch the labels because they are internally controlled by us
|
515
|
+
updateTextFieldCount(); // update the field count to the new data
|
516
|
+
checkForScroll(); // check for scroll bar necisity with new data
|
517
|
+
dispatchEvent(new Event("change"));
|
518
|
+
}
|
519
|
+
//**************************** DISPLAY **********************//
|
520
|
+
//watchItems
|
521
|
+
//unWatchItems
|
522
|
+
//valueUpdate
|
523
|
+
//onFocusOut
|
524
|
+
//onFocusKeyDown
|
525
|
+
//isVisible
|
526
|
+
private function resizeFields():void
|
527
|
+
{
|
528
|
+
var tfWidth:Number = width - 2 * getStyle("borderWidth");
|
529
|
+
// TODO: this works, but doesnt seem necissary as the bar is on top of them anyway
|
530
|
+
if(_sbar != null)
|
531
|
+
{
|
532
|
+
tfWidth -= _sbar.width // compensate for the scrollbar if it exists
|
533
|
+
}
|
534
|
+
// if the widths arent the correct size, resize them all
|
535
|
+
if(_textFields.length && _textFields[0].width != tfWidth)
|
536
|
+
{
|
537
|
+
for(var i:String in _textFields)
|
538
|
+
{
|
539
|
+
_textFields[i].width = tfWidth;
|
540
|
+
}
|
541
|
+
}
|
542
|
+
}
|
543
|
+
/**
|
544
|
+
* Update the data and selected status of the textfields on stage
|
545
|
+
* @param start Number optional (default 0) start index of the element to begin updating at and run untill the total
|
546
|
+
*/
|
547
|
+
private function updateTextFields(start:Number = 0):void
|
548
|
+
{
|
549
|
+
if(!isNaN(_updateInterval)) {
|
550
|
+
clearInterval(_updateInterval);
|
551
|
+
_updateInterval = undefined;
|
552
|
+
}
|
553
|
+
for(;start <= _numShown; start++) updateTF(start)
|
554
|
+
}
|
555
|
+
/**
|
556
|
+
* Update a single TextField's value and color
|
557
|
+
* @param i Number index of the textfield to update
|
558
|
+
*/
|
559
|
+
private function updateTF(i:Number):void
|
560
|
+
{
|
561
|
+
if(_textFields[i]) {
|
562
|
+
_textFields[i].text = _listItems[i + _scrollPos].label;
|
563
|
+
if(_selected.isSet(i + _scrollPos)) colorCellSelected(i);
|
564
|
+
else colorCellRest(i);
|
565
|
+
}
|
566
|
+
}
|
567
|
+
/**
|
568
|
+
* Create a new textfield(s)
|
569
|
+
* @param count Number of textfields to add
|
570
|
+
*/
|
571
|
+
private function createTF(count:int = 1):void
|
572
|
+
{
|
573
|
+
var numItems:int = _listItems.length;
|
574
|
+
var embed:Boolean = getStyle("embedFonts");
|
575
|
+
var textFormat:TextFormat = getStyle("textFormat");
|
576
|
+
var itemWidth:Number = width - 2 * getStyle("borderWidth");
|
577
|
+
var itemHeight:Number = getStyle("itemHeight");
|
578
|
+
while(count--)
|
579
|
+
{
|
580
|
+
if(_textFields.length < numItems)
|
581
|
+
{
|
582
|
+
var depth:int = _textFields.length;
|
583
|
+
var newTextField:TextField = new TextField();
|
584
|
+
newTextField.border = false;
|
585
|
+
newTextField.embedFonts = embed;
|
586
|
+
if(textFormat != null) newTextField.defaultTextFormat = textFormat;
|
587
|
+
newTextField.selectable = false;
|
588
|
+
if(_textFields.length) newTextField.y = _textFields[_textFields.length - 1].y + itemHeight;
|
589
|
+
_textFields.push(newTextField);
|
590
|
+
updateTF(depth);
|
591
|
+
newTextField.height = itemHeight;
|
592
|
+
_textFieldHolder.addChild(newTextField);
|
593
|
+
}
|
594
|
+
}
|
595
|
+
}
|
596
|
+
/**
|
597
|
+
* Check the current number of textfields to see if we need to add or remove any
|
598
|
+
* @return Boolean flag indicating if any changes were made
|
599
|
+
*/
|
600
|
+
private function updateTextFieldCount():Boolean
|
601
|
+
{
|
602
|
+
if(_textFields.length > _numShown)
|
603
|
+
{
|
604
|
+
var removedTFs:Array = _textFields.splice(_numShown, _textFields.length);
|
605
|
+
for(var i:* in removedTFs)
|
606
|
+
{
|
607
|
+
////trace("removing: " + i + " " + removedTFs[i]);
|
608
|
+
_textFieldHolder.removeChild(removedTFs[i]);
|
609
|
+
}
|
610
|
+
return true;
|
611
|
+
}
|
612
|
+
else if(_textFields.length < _numShown && _listItems.length > _textFields.length) {
|
613
|
+
//////trace("\nadding: ",_elements.length,_tfs.length);
|
614
|
+
createTF((_listItems.length < _numShown ? _listItems.length : _numShown) - _textFields.length); // calc the number of items to make
|
615
|
+
//createTF(_elements.length - _tfs.length); // calc the number of items to make
|
616
|
+
//createTF(1); //calc the number of items to make
|
617
|
+
//_tfs.arrange()
|
618
|
+
return true;
|
619
|
+
}
|
620
|
+
return false;
|
621
|
+
}
|
622
|
+
/**
|
623
|
+
* Default style objects
|
624
|
+
*/
|
625
|
+
protected override function styleDefaults():void
|
626
|
+
{
|
627
|
+
setStyle('scrollWidth', 12);
|
628
|
+
setStyle("borderWidth", 1)
|
629
|
+
setStyle("itemHeight", 20);
|
630
|
+
setStyle("textFormat", new TextFormat("Arial", 10, 0x000000));
|
631
|
+
setStyle("embedFonts", false);
|
632
|
+
}
|
633
|
+
}
|
634
|
+
}
|
635
|
+
class ListItem
|
636
|
+
{
|
637
|
+
public var label:String;
|
638
|
+
public var data:*;
|
639
|
+
public function ListItem(label:String = "", data:* = null)
|
640
|
+
{
|
641
|
+
this.label = label;
|
642
|
+
this.data = data;
|
643
|
+
}
|
644
|
+
}
|