Skinninng dataTip in spark.HSlider

Hello.
I skinned hslider. It works well, except the dataTip.
as a dataTip in my case I use custom component that shows a pie chart.
<fx:Declarations>
        <fx:Component id="dataTip" >    
            <s:DataRenderer y="50" autoLayout="true"> 
                <ui:Pie percentage="{data}" currentState="reference" dynamic="false"   />
            </s:DataRenderer>
        </fx:Component>
    </fx:Declarations>
Everything is working ok, except one small thing:
this dataTip is lagging behind the thumb. Means:
when I change the slider value by dragging the thumb, the dataTip follows the thumb but not consistently.
Sometimes it lags up to 10-15 of pixels and stays in this position until I MouseUP. And only when I click on the thumb
again it centers the dataTip.
Do you know how can I speed it up. Or make it recalculate its own position withing hslider skin?

thank you but I have already seen this and am using it to add tick marks I cannot get the same technique to work for labels. slider compoent ends up expanding until its too large to render

Similar Messages

  • Flex 4 HSlider Tick Marks?

    How would one go about doing this. I have a class extending the Spark HSlider and a skin for it, but what kind of Display Object should I used to display the values for Tick Marks..
    some code below: I figured DataGroup as a possible repeater component, but nothing shows.  Any help being able repeat a set of Lines with X and Y values would be greatly appreciated.
    Thanks,
    Skitch
    PlayerSlider.as (Component):
    import mx.collections.ArrayCollection;
        import spark.components.DataGroup;
        import spark.components.HSlider;
        public class PlayerSlider extends HSlider
            [SkinPart(required="false")]
            public var tickMarks:DataGroup;
            public function PlayerSlider()
                super();
            [Bindable]       
            public function set tickValues(value:ArrayCollection):void
                _tickValues = value;
                _tickValuesChanged = true;
                invalidateProperties();
            public function get tickValues():ArrayCollection { return _tickValues; }
            protected var _tickValues:ArrayCollection;
            protected var _tickValuesChanged:Boolean = false;
             * Adding the prompt text to the label if it's available
            override protected function commitProperties():void
                super.commitProperties();
                if (this._tickValuesChanged)
                    if (tickMarks)
                        tickMarks.dataProvider = tickValues;
                    this._tickValuesChanged = false;
            override protected function partAdded(partName:String, instance:Object):void
                super.partAdded(partName, instance);
                if (instance == tickMarks)
                    tickMarks.dataProvider = tickValues;
    PlayerSliderSkin.mxml (SkinClass):
    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minHeight="11" alpha.disabled="0.5" xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Metadata>[HostComponent("com.digitalsmiths.util.playerSlider.PlayerSlider")]</fx:Meta data>
        <fx:Script fb:purpose="styling">
            /* Define the skin elements that should not be colorized.
               For slider, the skin itself is colorized but the individual parts are not. */
            static private const exclusions:Array = ["track", "thumb"];
             * @private
            override public function get colorizeExclusions():Array {return exclusions;}
             * @private
            override protected function initializationComplete():void
                useChromeColor = true;
                super.initializationComplete();
        </fx:Script>
        <fx:Script>
             *  @private
            override protected function measure() : void
                // Temporarily move the thumb to the left of the Slider so measurement
                // doesn't factor in its x position. This allows resizing the
                // HSlider to less than 100px in width.
                var thumbPos:Number = thumb.getLayoutBoundsX();
                thumb.setLayoutBoundsPosition(0, thumb.getLayoutBoundsY());
                super.measure();
                thumb.setLayoutBoundsPosition(thumbPos, thumb.getLayoutBoundsY());
        </fx:Script>
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>
        <fx:Declarations>
            <!--- The tooltip used in the mx.controls.Slider control.
                   To customize the DataTip's appearance, create a custom HSliderSkin class.-->
            <fx:Component id="dataTip">    
               <s:DataRenderer minHeight="24" minWidth="40" y="-34"> 
                  <s:Rect top="0" left="0" right="0" bottom="0">
                        <s:fill>
                            <s:SolidColor color="0x000000" alpha=".9"/>
                        </s:fill>
                        <s:filters>
                            <s:DropShadowFilter angle="90" color="0x999999" distance="3"/>
                        </s:filters>
                    </s:Rect>
                    <s:Label id="labelDisplay" text="{data}"
                             horizontalCenter="0" verticalCenter="1"
                             left="5" right="5" top="5" bottom="5"
                             textAlign="center" verticalAlign="middle"
                             fontWeight="normal" color="white" fontSize="11">
                    </s:Label>
                </s:DataRenderer>
           </fx:Component>
        </fx:Declarations>
        <!--- The default skin class is HSliderTrackSkin.
        @copy spark.components.supportClasses.TrackBase#track
        @see spark.skins.spark.HSliderTrackSkin -->
        <s:Button id="track" left="0" right="0" top="0" bottom="0" minWidth="33" width="100"
                  skinClass="styling.skinClasses.sliders.track.HSliderTrackSkin"/>
        <!--- The default skin class is HSliderThumbSkin.
        @copy spark.components.supportClasses.TrackBase#thumb
        @see spark.skins.spark.HSliderThumbSkin -->
        <s:Button id="thumb" top="0" bottom="0" width="4" height="11"
                  skinClass="styling.skinClasses.sliders.thumb.HSliderThumbSkin"/>
        <s:DataGroup id="tickMarks" left="0" right="0" top="0" bottom="0" minWidth="33" width="100">
            <s:layout>
                <s:BasicLayout/>
            </s:layout>
            <s:itemRenderer>
                <fx:Component>
                    <s:ItemRenderer>
                        <s:Line
                            height="100%">
                            <s:stroke>
                                <s:SolidColorStroke color="0x525254"/>
                            </s:stroke>
                        </s:Line>
                    </s:ItemRenderer>
                </fx:Component>
            </s:itemRenderer>
        </s:DataGroup>
    </s:SparkSkin>

    These threads might be useful for you:
    http://forums.adobe.com/message/2486681#2486681
    http://forums.adobe.com/message/2476351#2476351
    In CustomSlider4.zip there is a skin file called HSliderTrackSkinTicks.mxml that shows a very simple way of implementing tick marks.  DataGroup should work too, but it will be a little trickier to line up the ticks properly.

  • HSlider and mouse wheel

    I'm using Flex 4 and I've noticed something annoying with the spark HSlider: if I click the slider, it seems to retain focus so that even if the mouse is not over it, moving the mouse wheel up or down still causes the slider to move left or right.
    I'd actually prefer that my slider not respond to mouse wheel events at all, but preventDefault() doesn't seem to work in this case. How can I get an HSlider to ignore mouse wheel events???
    Thanks,
    Rob

    Sublcass HSlider and include this code
    override protected function system_mouseWheelHandler(event:MouseEvent):void
                // DO NOT DELETE THIS FUNCTION
                // leave blank to remove wheel scrolling on sliders

  • Flash Builder 4 - Beta / Design view sporadic at best

    Okay, so I have installed the beta, and running through the Catalyst / Flash BUilder 4 tutorial, all is well, unitl i try to get the imprted fxp file to consistently display in the design mode. Not only that, but switching from code view to design view will break it just about 95% of the time, and then it will not display the created items that the tutorial has you put on them (i.e. the databinds to the names, etc etc).
    Has anyone else experienced this? Other than a few little things like this, so far so good guys(ADOBE).
    Thanks,
    Craig Newroth

    eh_adobe wrote:
    Please be aware that using a newer SDK with Flash Builder Beta's Design View may have unpredictable results. I can't say specifically since I don't know what version you tried and what your document contained, but... let's pretend for a second that the SDK changed something in a component - its name, its package, or any method or properties in it.  Design View was compiled with a specific version of the SDK, and would not know about that change, and so might not react very well to the document. Yes this is not ideal, but it's hard to avoid when the SDK is changing rapidly (at some point it will settle down, and this won't be an issue). We can look at ways to mitigate this.
    I have had less unpredicatable results with recent builds of the SDK the latest being build 7988- I basically update from the svn trunk every 2-3 days look through the changes run the checkintests just to make sure all is ok then see what happens to be small testbed apps, I have been doing this for several months. I don't mind the IDE not dealing with the changes as long as it tells me why it can't. But the code should not break the IDE. Also i'm getting a little confused as some of the responses to some issues (not the design mode one) in this forum have suggested seeing what happens with updated SDK's.
    Anyway I have reverted everything back to a standard FB4 install and the first thing that happened yet another new flaw in design mode rears its head, no errors but this time a visually definable issue. The component appears as a 1 dimension line in the top left hand corner of the design editor window, not even on the design view working canvas. Attached is a screen shot and the associated code that caused it. Please note the IDE didn't draw the big red ring around the visual glitch so thats one less bug to worry about.
         the app.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
         <s:HSlider x="50" y="50" width="200" height="30" skinClass="skins.HSliderSkin"/>     
    </s:Application>
         skin part A.
    <?xml version="1.0" encoding="utf-8"?>
    <!--
         ADOBE SYSTEMS INCORPORATED
         Copyright 2008 Adobe Systems Incorporated
         All Rights Reserved.
         NOTICE: Adobe permits you to use, modify, and distribute this file
         in accordance with the terms of the license agreement accompanying it.
    -->
    <!--- The default skin class for the Spark HSlider component. The thumb and track skins are defined by the
    HSliderThumbSkin and HSliderTrackSkin classes, respectively. -->
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
           minHeight="11" minWidth="100"
           alpha.disabled="0.5">
        <fx:Metadata>
        <![CDATA[
          * @copy spark.skins.default.ApplicationSkin#hostComponent
             [HostComponent("spark.components.HSlider")]
        ]]>
        </fx:Metadata>
        <fx:Script>
            /* Define the skin elements that should not be colorized.
               For slider, the skin itself is colorized but the individual parts are not. */
            static private const exclusions:Array = ["track", "thumb"];
          * @copy spark.skins.SparkSkin#colorizeExclusions
            override public function get colorizeExclusions():Array {return exclusions;}
        </fx:Script>
        <s:states>
             <s:State name="normal" />
             <s:State name="disabled" />
        </s:states>
        <fx:Declarations>
         <!--- Defines the appearance of the the Slider's DataTip. To customize the DataTip's appearance, create a custom HSliderSkin class. -->
            <fx:Component id="dataTip">         
                <s:MXMLComponent minHeight="24" minWidth="40" y="-34"> 
                    <s:Rect top="0" left="0" right="0" bottom="0">
                             <s:fill>
                                  <s:SolidColor color="0x000000" alpha=".9"/>
                             </s:fill>
                             <s:filters>
                                 <s:DropShadowFilter angle="90" color="0x999999" distance="3"/>
                            </s:filters>
                        </s:Rect>
                        <s:SimpleText id="labelElement" text="{data}"
                             horizontalCenter="0" verticalCenter="1"
                             left="5" right="5" top="5" bottom="5"
                             textAlign="center" verticalAlign="middle"
                             fontWeight="normal" color="white" fontSize="11">
                    </s:SimpleText>
                </s:MXMLComponent>
            </fx:Component>
         </fx:Declarations>
        <!--- Defines the skin class for the HSliderSkin's track. The default skin class is HSliderTrackSkin. -->
        <s:Button id="track" left="0" right="0" top="0" bottom="0"
                  skinClass="skins.HSliderTrackSkin"/>
        <!--- Defines the skin class for the HSliderSkin's thumb. The default skin class is HSliderThumbSkin. -->
        <s:Button id="thumb" top="1" bottom="1" width="{hostComponent.height*1.5}" skinClass="skins.HSliderThumbSkin"/>
    </s:SparkSkin>
         Skin Part B
    <?xml version="1.0" encoding="utf-8"?>
    <!--
         ADOBE SYSTEMS INCORPORATED
         Copyright 2008 Adobe Systems Incorporated
         All Rights Reserved.
         NOTICE: Adobe permits you to use, modify, and distribute this file
         in accordance with the terms of the license agreement accompanying it.
    -->
    <!--- The default skin class for the thumb of a Spark HSlider component. -->
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
        <fx:Metadata>
        <![CDATA[
          * @copy spark.skins.default.ApplicationSkin#hostComponent
             [HostComponent("spark.components.Button")]
        ]]>
        </fx:Metadata>
        <s:states>
            <s:State name="up" />
            <s:State name="over" />
            <s:State name="down" />
            <s:State name="disabled" />
        </s:states>
        <!-- border -->
        <s:Rect left="0" right="0" top="0" bottom="0" radiusX="{hostComponent.height/2}" radiusY="{hostComponent.height/2}">
            <s:fill>
                <s:SolidColor color="0x4F4F4F"  />
            </s:fill>
        </s:Rect>
         <!-- fill -->
         <s:Rect left="0.5" right="0.5" top="0.5" bottom="0.5" radiusX="{hostComponent.height/2}" radiusY="{hostComponent.height/2}">
              <s:stroke>
                   <s:LinearGradientStroke rotation="90" weight="1">
                        <s:GradientEntry color="0x000000" alpha="0" />
                        <s:GradientEntry color="0x000000" alpha="0.33" />
                   </s:LinearGradientStroke>
              </s:stroke>
              <s:fill>
                   <s:LinearGradient rotation="90">
                        <s:GradientEntry color="0xFFFFFF"
                                          color.over="0xE5E5E5"
                                          color.down="0x999999" />
                        <s:GradientEntry color="0xD8D8D8"
                                          color.over="0x7D7D7D"
                                          color.down="0x555555" />
                   </s:LinearGradient>
              </s:fill>
         </s:Rect>
         <!-- highlight -->
    </s:SparkSkin>
         Skin Part C
    <?xml version="1.0" encoding="utf-8"?>
    <!--
         ADOBE SYSTEMS INCORPORATED
         Copyright 2008 Adobe Systems Incorporated
         All Rights Reserved.
         NOTICE: Adobe permits you to use, modify, and distribute this file
         in accordance with the terms of the license agreement accompanying it.
    -->
    <!--- The default skin class for the track of a Spark HSlider component. -->
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
        <fx:Metadata>
        <![CDATA[
          * @copy spark.skins.default.ApplicationSkin#hostComponent
             [HostComponent("spark.components.Button")]
        ]]>
        </fx:Metadata>
        <s:states>
            <s:State name="up" />
            <s:State name="down" />
            <s:State name="over" />
            <s:State name="disabled" />
        </s:states>
         <!-- border -->
        <s:Rect left="-1" right="-1" top="0" bottom="-1" radiusX="{hostComponent.height/2}" radiusY="{hostComponent.height/2}">
            <s:fill>
                <s:LinearGradient rotation="90" >
                     <s:GradientEntry color="0x000000" alpha="0.55" />
                     <s:GradientEntry color="0xFFFFFF" alpha="0.55" ratio="0.8" />
                </s:LinearGradient>
            </s:fill>
        </s:Rect>
        <!-- fill -->
        <s:Rect left="0" right="0" top="1" bottom="0" radiusX="{hostComponent.height/2}" radiusY="{hostComponent.height/2}">
            <s:fill>
                <s:SolidColor color="0xCACACA" />
            </s:fill>
        </s:Rect>
         <!-- hit area -->
         <s:Rect left="0" right="0" top="0" bottom="0" radiusX="{hostComponent.height/2}" radiusY="{hostComponent.height/2}">
              <s:fill>
                   <s:SolidColor alpha="0"/>
              </s:fill>
         </s:Rect>
    </s:SparkSkin>

  • Zoom scroller "to fit"?

    I have a group component in a scroller.  My application will add children to this component.  The component's scale is set with a Spark HSlider.  Fine.
    However, I'd like to provide a "zoom to fit" button.  I can get the size in pixels of all the children added, no problem. My question is how I can use this dimension to properly set the scaleX and scaleY so it fits in the viewport.
    <s:Group id="clipWindow" width="720" height="480">
         <s:Scroller id="imgScroll" top="0" left="0" bottom="0" right="0">
              <s:Group id="bgimg" scaleX="{scaleSlider.value}" scaleY="{scaleSlider.value}">
                   <com:WorkshopStage id="ws" />
              </s:Group>
         </s:Scroller>
    </s:Group>

    Basicly this is only math stuff. Here is what you will have to write inside your "Zoom To Fit" handler:
    bgimg.scaleX = bgimg.scaleY = Math.min(clipWindow.width  / ws.width,
                                           clipWindow.height / ws.height,
                                           1);
    Now this formula only scales down your bgimg if it (actually I use dimensions of ws but that does not matter here) is larger than the clipWindow. If it is smaller, scale will be 1: it won't scale up.
    And as you can see there is no need for calculating the size of ws manually by somehow checking all children: flex does that for you when components are measured.
    Michael

  • Problem with FTE in DataTips of PlotChart (missing texts)

    Hi @all,
    we have decided to use the Flex 4.1 and Flash text engine in our projects.
    Now I have the following problem with the dataTips: the texts are appearing only partly if datatips of more than one point are showing. The behavior is not regularly.
    Here is my code for testing (compiler options: hook at "Use Flash Text engine in MX components":
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      minWidth="955"
      minHeight="600"
      creationComplete="init()">
      <fx:Declarations>
        <mx:SolidColor id="sc1" color="#EC6605" alpha=".3"/>
        <mx:SolidColorStroke id="s1" color="#EC6605" weight="1"/>
      </fx:Declarations>
      <fx:Script>
        <![CDATA[
          import mx.charts.HitData;
          import mx.collections.ArrayCollection;
          [Bindable]
          private var seriesAverageScores:ArrayCollection = new ArrayCollection(new Array());
          private static const tipDataString:String = "zeile 1 zeile 1 zeile 1\nzeile 2 zeile 2 zeile 2\nzeile 3 zeile 3 zeile 3\nzeile 4 zeile 4 zeile 4\n -\n -\n -";
          private function init():void {
            seriesAverageScores.addItem({x: 1, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.1, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.05, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 0.95, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.15, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 3, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 1.12, y: 2, dataTip: tipDataString});
            seriesAverageScores.addItem({x: 2, y: 2, dataTip: tipDataString});
          private function dataTipFunction_average(hd:HitData):String {
            var val:String;
            var d:Object = hd.item as Object;
            return d.dataTip;
        ]]>
      </fx:Script>
      <s:VGroup width="100%"
        height="100%">
        <mx:PlotChart id="myChart1" width="100%" height="100%"
          dataTipFunction="dataTipFunction_average" showDataTips="true">
          <mx:verticalAxis>
            <mx:LinearAxis title="TurnOvers" padding="0.1" minimum="0" maximum="50"/>
          </mx:verticalAxis>
          <mx:horizontalAxis>
          <mx:LinearAxis title="Scores" padding="0.1" minimum="0" maximum="10"/>
          </mx:horizontalAxis>
          <mx:series>
            <mx:PlotSeries dataProvider="{seriesAverageScores}"
              name="series 1" fill="{sc1}" stroke="{s1}"
              displayName="Average Scores per customer"
              xField="x"
              yField="y">
            </mx:PlotSeries>
          </mx:series>
        </mx:PlotChart>
      </s:VGroup>
    </s:Application>
    Has anyone an idea how to solve this ?
    Thanks, Lutz

    Has noone an idea?
    The same problem exists with Legends. For this there was a help from Adobe with a style.
    Isn't there a comparable solution for this malfunction?

  • Stacked 100% bar chart - Problem with datatips for zero value data points

    I have a stacked 100% bar chart that shows datatips in Flex 4.   However, I don't want it to show datatips for
    data points with zero values.   Flex 4 shows the datatip for a zero value data point on the left side of a bar if the data point is not the first in the series.
    Here's the code that illustrates this problem.    Of particular concern is the July bar.    Because of the zero value data point problem, it's not possible to see the datatip for "aaa".
    Any ideas on how we can hide/remove the datatips for zero value data points ?        Thanks.
    <?xml version="1.0"?>
    <s:Application
    xmlns:fx="
    http://ns.adobe.com/mxml/2009"xmlns:mx="
    library://ns.adobe.com/flex/mx"xmlns:s="
    library://ns.adobe.com/flex/spark"creationComplete="initApp()"
    height="
    1050" width="600">
    <s:layout>
    <s:VerticalLayout/>
    </s:layout>
    <fx:Script><![CDATA[ 
    import mx.collections.ArrayCollection;[
    Bindable] 
    private var yearlyData:ArrayCollection = new ArrayCollection([{month:
    "Aug", a:1, b:10, c:1, d:10, e:0},{month:
    "July", a:1, b:10, c:10, d:10, e:0},{month:
    "June", a:10, b:10, c:10, d:10, e:0},{month:
    "May", a:10, b:10, c:10, d:0, e:10},{month:
    "April", a:10, b:10, c:0, d:10, e:10},{month:
    "March", a:10, b:0, c:10, d:10, e:10},{month:
    "February", a:0, b:10, c:10, d:10, e:10},{month:
    "January", a:10, b:10, c:10, d:10, e:10}]);
    private function initApp():void {}
    ]]>
    </fx:Script>
    <s:Panel title="Stacked Bar Chart - Problems with DataTips for Zero Value Items" id="panel1">
    <s:layout>
    <s:HorizontalLayout/>
    </s:layout>
    <mx:BarChart id="myChart" type="stacked"dataProvider="
    {yearlyData}" showDataTips="true">
    <mx:verticalAxis>
     <mx:CategoryAxis categoryField="month"/>
     </mx:verticalAxis>
     <mx:series>
     <mx:BarSeries
    xField="a"displayName="
    aaa"/>
     <mx:BarSeries
    xField="b"displayName="
    bbb"/>
     <mx:BarSeries
    xField="c"displayName="
    ccc"/>
     <mx:BarSeries
    xField="d"displayName="
    ddd"/>
     <mx:BarSeries
    xField="e"displayName="
    eee"/>
     </mx:series>
     </mx:BarChart>
     <mx:Legend dataProvider="{myChart}"/>
     </s:Panel>
     <s:RichText width="700">
     <s:br></s:br>
     <s:p fontWeight="bold">The problem:</s:p>
     <s:p>Datatips for zero value data points appear on left side of bar (if data point is not the first point in series).</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">For example:</s:p>
     <s:p>1) For "June", eee = 0, mouse over the left side of the bar to see a datatip for "eee". Not good.</s:p>
     <s:br></s:br>
     <s:p>2) For "July", eee = 0 and aaa = 1, can't see the datatip for "aaa", instead "eee" shows. Real bad.</s:p>
     <s:br></s:br>
     <s:p>3) For "Feb", aaa = 0, datatip for "aaa" (first point) does not show. This is good.</s:p>
     <s:br></s:br>
     <s:p>4) For "Mar", bbb = 0, datatip for "bbb" shows on the left side of the bar. Not good.</s:p>
     <s:br></s:br>
     <s:p fontWeight="bold">Challenge:</s:p>
     <s:p>How can we hide/remove datatips for zero value data points?</s:p>
     <s:br></s:br>
     </s:RichText></s:Application>

    FYI.
    Still have the issue after upgrading to the latest Flex Builder 4.0.1 with SDK 4.1.0 build 16076.   
    Posted this as a bug in the Adobe Flex Bug and Issue Management system.     JIRA
    http://bugs.adobe.com/jira/browse/FLEXDMV-2478
    Which is a clone of a similar issue with Flex 3 ...
    http://bugs.adobe.com/jira/browse/FLEXDMV-1984

  • Regarding HSlider in mobile view

    Hi,
    I am making an mobile app.I need a HSlider with two thumb for min amd max selection I am giving an screenshot if there is any code or solution it will be helpful for me.
    I have got this for mx view but I need for spark view.
    this is the image of bar:-
    http://screencast.com/t/KUHWc4ae11
    anyhelp will be appreciated,

    Hi,
    According to your description, my understanding is that you want to access mobile view of SharePoint site in browser.
    I recommend to append "?Mobile=1" to the end of the URL of the SharePoint site
    to access the mobile view, such as http://MyServer/MySite/home.aspx?Mobile=1.
    If it cannot work, check if the mobile view is activated for the site.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • DataTipFields in Spark Lists?

    It doesn't seem like Spark's List controls are fully implemented;  at the very least dataTips and dataTipFields aren't.  This Halo code works:
    <mx:List id="courseCatalog" dataProvider="{getAllCoursesResult.lastResult}" labelField="title"  showDataTips="true" dataTipField="slug" ></mx:List>
    but the Spark version:
    <s:List id="courseCatalog" dataProvider="{getAllCoursesResult.lastResult}" labelField="title"  showDataTips="true" dataTipField="slug" ></s:List>
    yields these errors.
    Cannot resolve attribute 'dataTipField' for component type spark.components.List.   
    Cannot resolve attribute 'showDataTips' for component type spark.components.List.
    Is this a known issue?
    --Mike Jennings

    Correct, the mx:List and s:List components are two separate components and don't always have the exact same APIs. Most of the time the same functionality exists in both controls, but they may have slightly different names. I believe the latest Flex 4/ActionScript 3.0 Language Reference is posted at http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/ and should list which properties/methods/styles are supported by each component.
    As for your dataTip question, this may work for you: http://blog.flexexamples.com/2009/08/15/creating-data-tips-on-a-spark-list-control-in-flex -4/
    Not 100% certain about the variable row height, but I can take a look.
    Peter

  • How to code spark custom component with variable number of (skin)parts?

    Hello. I'm trying to code a complex Spark custom component that may have a variable number of parts. To help you understand the requirements, the component can be visualized as an HSlider with a unlimited number of thumbs (as opposed to one).
    How do I, in general, represent these thumbs in the host component as well as the skin? If I had a fixed number of thumbs, say 5, I could easily represent them as 5 button SkinParts declaratively. However, it's not immediately clear to me how to deal with a variable number of them.
    I've studied the HSlider implementation as well as other components and can't find an example that fits this pattern. The closest thing that I can think of is to represent the thumbs as a DataGroup and provide a custom item renderer to render them. Couple that with the general HSlider behaviors that I need to preserve, such as the fairly involved local/global coordinate translations, I don't know whether the approach will work.
    Any better ideas? Thanks.

    #2 sounds utterly strange to me. How would I utilize the phase id?The code below shows my idea whereas I never validate it in any real projects:
    public class MyPhaseListener implements PhaseListener {
         private static final String IDKEY = "PHASEID";
         public static PhaseId getCurrentPhaseId() {
              return (PhaseId) FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get(IDKEY);
         public void beforePhase(PhaseEvent event) {
    event.getFacesContext().getExternalContext().getRequestMap().put(IDKEY,event.getPhaseId());
         public PhaseId getPhaseId() {
              return PhaseId.ANY_PHASE;
    }You can write your constructor like as:
    if (MyPhaseListener.getCurrentPhaseId().equals(PhaseId.RENDER_RESPONSE ) {
         /* create children because this is the first time to create the component */
    }

  • [svn] 4078: Add support for dataTips to Slider

    Revision: 4078
    Author: [email protected]
    Date: 2008-11-11 17:41:52 -0800 (Tue, 11 Nov 2008)
    Log Message:
    Add support for dataTips to Slider
    SDK-16291 Implement data tip for slider
    - Added new dynamic, optional skin part called "dataTip".
    - Added dataTipFormatFunction, dataTipPrecision and showDataTip properties
    - Added protected function positionDataTip
    - Added dataTip skin part to FxHSliderSkin and FxVSliderSkin
    - data tip is an IDataRenderer, so it can render any type of data
    The data tip appearance is defined entirely by the skin. The position of the
    data tip is calculated using a combination of the skin and the Slider controller.
    The following properties were not retained from the Halo Slider:
    - sliderDataTipClass (the skin part allows the developer to define the data tip type)
    - dataTipStyleName (styling is defined on the skin part)
    - dataTipOffset (the offset position is defined in the skin part)
    SDK-16823 - Gumbo Slider does not support scroll wheel to increment / decrement value
    Slider listens for scroll wheel events anywhere on or off the stage while it has focus.
    QE Notes: Test new properties, functions and data tip behavior
    Doc Notes: Added new properties and functions
    Bugs: SDK-16291, SDK-16823
    Reviewer: Glenn and Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-16291
    http://bugs.adobe.com/jira/browse/SDK-16823
    http://bugs.adobe.com/jira/browse/SDK-16291
    http://bugs.adobe.com/jira/browse/SDK-16823
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxSlider.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxHSliderSkin.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxVSliderSkin.mxml

    Kaffeegler
    Try rolling your fingertip on the mouse pad. This works very well and you have much more control.
    You've mentioned that you get fed up and then insert numbers or even click the up/down arrows.
    Alternatively and I only found this out the other day - thanks Victoria B.
    Use the comma , and period / stop . keys to navigate down / up through the settings below
    LR4 settings
    temp (white balance)
    tint
    exposure
    contrast
    highlights
    shadows
    white clipping
    black clipping
    clarity
    saturation
    vibrance
    LR3 settings
    temp (white balance)
    tint
    exposure
    contrast
    higlight recovery
    fill light
    black clipping
    brightness
    contrast
    and use the + and - keys  to move the sliders up and down in medium (±5)  steps and press control / cmd and + -  keys to use smaller (±1) steps. I think using the alt / option key with the + and - keys moves the sliders in larger (±10 oe 20) steps.
    You can use the aleft right rrow keys, but for some reason (bug), they dont follow the focus with the , and ., so you still need to click on the sliders to move the focus from one setting to another if you prefer to use the arrows.
    As I said above, the apple magic mouse is amazing for OSX snow leopard and Lion and is so intuitive for LR, but its an expensive mouse but IMHO well worth it
    Hope these help, the , and . is a great alternative to rolling your finger on the touchpad.
    hamish NIVEN Photography

  • Help needed in adding effects of certain HTML tags in Flex spark Richtext

    I want to apply the effects of the following HTML tags/ attributes, in my HTML text rendered in Flex Spark Richtext Component.
    Superscript - <sup>
    Subscript - <sub>
    Blockquotes - <blockquotes>
    Ordered Lists - <ol><li>
    Unordered List - <ul><li>
    Horizontal Rule - <hr>
    Direction Attribute for <p> - <p dir="rtl">Hello</p>
    Background Color for <font>
    I have observed that the above tags have no effect in RichText. Is this a limitation?
    Any solutions, tweaks and tricks will be appreciated...
    Thanks,
    Mangirish

    check this out . this should be able to answer you question.
    http://livedocs.adobe.com/flex/3/html/help.html?content=textcontrols_04.html
    Miguel

  • How Do You Populate A Spark List Control With An Array?

    Hello, all,
    Sorry to come accross so frustrated, but how in the name of God do you populate a Spark list control with the data in an array?  You used to be able to do this with the mx:List control, but the guys developing Flex just had to make things more difficult than they need to be!  I am more of a code purist and prefer doing things the way they have been done for decades, but apparently nothing can ever stay simple!
    I simply want to populate a list control with an array and this shouldn't be rocket science!  I found out that I must use a "collection" element, so I decided that an arrayCollection would be best.  However, after searching Adobe's documentation about arrayCollections, I am lost in a black hole of data binding, extra lines of code just to add a new element, the need to sort it, etc...!
    Here is my code:
    var pendingArray:ArrayCollection = new ArrayCollection();
    for ( var i:int = 0 ; i < queue.length ; i++ )
         var item:UserQueueItem = queue[i] as UserQueueItem ;
         if ( item.status == UserQueueItem.STATUS_PENDING )
         pendingArray.addItem({label:item.descriptor.displayName,descriptor:item.descriptor});
    Here is the relevant MXML:
    <s:VGroup>
         <s:List id="knockingList" width="110" height="100"/>              
    </s:VGroup>
    I'm not getting any errors, but the list is not populating.
    I have seen several examples where the arrayCollection is declared and populated in MXML:
            <mx:ArrayCollection id="myAC">
                <!-- Use an fx:Array tag to associate an id with the array. -->
                <fx:Array id="myArray">
                    <fx:Object label="MI" data="Lansing"/>
                    <fx:Object label="MO" data="Jefferson City"/>
                    <fx:Object label="MA" data="Boston"/>
                    etc...
               </fx:Array>
            </mx:ArrayCollection>
    That may be fine for an example, but I think this is a rare situation.  Most of the time I would image that the arrayCollection would be created and populated on the fly in ActionScript!  How can I do this?
    Thanks in advance for any help or advice anyone can give!
    Matt

    In your post it seemed like you were trying to take care of many considerations at once: optimization, design, architecture.  I would suggest you get something up and running and then worry about everything else.
    If I use data binding, then I will probably have to declare the  arrayCollection as a global variable and then I'll have to write 100 or  so extra lines of code to addItem(), removeItem(), sort(), etc...  It  just seems like too much overhead.
    I believe you may have some misconceptions about databinding in general.  You won't have to make it a global variable and you certainly won't need an extra 100 lines of code.  If you did this forum would be a very , very quiet place.
    I don't want to use data binding because the original array is refreshed  often and there is one function called by an event that re-declares the  arrayCollection each time, populates it with the array, and then sets  it as the list's dataprovider.
    That is the beauty of the ArrayCollection, it can handle the updates to its source Array. I don't know if you need to redeclare the ArrayCollection, resetting the source to the new Array allows everyone involved to keep their references so you don't have to worry about any "spooky" stuff going on.

  • Using Squiggly with Spark TextArea causes TLF formatting to disappear

    We are using a Spark TextArea component in our application to offer more enhanced text formatting options to our users. Yesterday we downloaded Squiggly since it's the only one available that seems to support the spark components. It is highlighting misspelled words correctly and does have a nice right-click context menu with suggestions, etc. However, when we select a word from the suggestion list and it replaces it in the text area, it seems to replace the entire contents of the textarea as plain text. Any formatting on the text such as bold, italics, font sizes, underlines, all immediately disappear once the misspelled word is replaced. We're using the SpellUI implementation. Below is some of the snippets of the code we're using to implement SpellUI:
    protected function createTextArea():void {
      _textArea = new TextArea();
      _textArea.editable = true;
      _textArea.enabled = true;
      _textArea.textFlow = TextConverter.importToFlow(XML(dataModel.value)[0], TextConverter.TEXT_LAYOUT_FORMAT);
      _textArea.textFlow.flowComposer.updateAllControllers();
      _textArea.addEventListener(FlexEvent.CREATION_COMPLETE, setupSpellCheck, false, 0, true);
    private function setupSpellCheck(event:Event=null):void {
      logger.debug("setupSpellCheck", "Setting up spell check system...");
      _textArea.removeEventListener(FlexEvent.CREATION_COMPLETE, setupSpellCheck);
      resourceManager.localeChain = [localeStr];
      enableSpellCheck();
      enableSpellCheckContextMenu();
    private function enableSpellCheck():void {
      SpellUI.enableSpelling(_textArea, localeStr);
    private function enableSpellCheckContextMenu():void {
      var contextMenu:Object = {add:resourceManager.getString('SquigglyContextMenu', 'add'),
                                             enable:resourceManager.getString('SquigglyContextMenu', 'enable'),
                                             disable:resourceManager.getString('SquigglyContextMenu', 'disable')};
      SpellUI.setSpellingMenuEntries(contextMenu);
    As you can see, we're constructing a new TextArea control and setting it's textFlow by importing an existing textflow XML that we have saved in our database. Once the TextArea has dispatched the FlexEvent.CREATION_COMPLETE, we are setting up the spell check system and everything works ok until you actually correct a misspelled word by selecting it from the right-click suggestions list. The text initially imported may have any number of styles applied to it as I mentioned above. Once the spelling replacement occurs, all the formatting is wiped out for the entire text area.
    Any thoughts?
    -Jason Kringen

    Just to give some more details, here's the TextFlow output from our TextArea before using the spell check word replacement:
    <TextFlow columnCount="inherit" columnGap="inherit" columnWidth="inherit" lineBreak="inherit" paddingBottom="inherit" paddingLeft="inherit" paddingRight="inherit" paddingTop="inherit" verticalAlign="inherit" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p direction="ltr" justificationRule="auto" justificationStyle="auto" leadingModel="auto" paragraphEndIndent="0" paragraphSpaceAfter="0" paragraphSpaceBefore="0" paragraphStartIndent="0" textAlign="start" textAlignLast="start" textIndent="0" textJustify="interWord"><span>Text goes in here. </span><span alignmentBaseline="useDominantBaseline" backgroundAlpha="1" backgroundColor="transparent" baselineShift="0" breakOpportunity="auto" cffHinting="horizontalStem" color="#000000" digitCase="default" digitWidth="default" dominantBaseline="auto" fontFamily="Arial" fontLookup="embeddedCFF" fontSize="28" fontStyle="normal" fontWeight="bold" kerning="auto" ligatureLevel="common" lineHeight="120%" lineThrough="false" locale="en" renderingMode="cff" textAlpha="1" textDecoration="none" textRotation="auto" trackingLeft="0" trackingRight="0" typographicCase="default">misspeled</span><span> jhkjd het </span></p></TextFlow>
    And here is the TextFlow output immediately after replacing a misspelled word:
    <TextFlow columnCount="inherit" columnGap="inherit" columnWidth="inherit" lineBreak="inherit" paddingBottom="inherit" paddingLeft="inherit" paddingRight="inherit" paddingTop="inherit" verticalAlign="inherit" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"><p><span>Text goes in here. misspeled jhkjd get </span></p></TextFlow>
    So it's obviously stripping out all of the TLF formatting and simply leaving the blank <p> and <span> tags without any of the formatting details.

  • Is there a better option than spark VideoDisplay with AV syncing capabilities

    We have developed an AIR application that involves syncing multiple audio tracks with a video track.  We are using the Spark VideoDisplay component for video and the Flash SoundChannel object for audio.  We are having trouble keeping the audio synced with the video.  Is there a better component to use for this?  Is there some technique to keeping audio and video synced in Flash/AIR?

    Andrea,
    Your sample does not look like being »foot-intensive«, I only find two footnotes. And those will not be a problem for FrameMaker.
    For 2-column text layout FrameMaker (as InDesign) gives you the option to create one text frame set to have two columns, or create two connected text frames, each of them one column. To keep the footnote in the original column, you would use the latter method. More information can be found in the online help:
    http://help.adobe.com/en_US/framemaker/using/WS6C3D24E6-2965-48bb-B6CF-50D1439AEB01.html
    Regarding other elements of the sample pages I don’t see any stumbling blocks. Just be aware that the general approach to layout, and especially when using XML-structured documents, is completely different from InDesign. With InDesign you just move all the frames wherever and whenever you want. With FrameMaker you plan ahead, create master pages and paragraph styles and then follow this original design. Creating layout changes »on the fly« is just not the way you work in FrameMaker. But this limitation is the reason for a higher layout consistency.
    - Michael

Maybe you are looking for

  • SD DVD Compressions

    I have been compressing for like the last six months with Compressor, Compressor 2 and Bit Vice and for the life of me can't get anything that holds up quality wise. The cow has been great in solving problems in the past and have helped to an extent

  • I want to clean up unnecessary files from my Imac Pc ?

    I have my Mac for over 5 years and never done a clean up, is about time i am sure  i have stuff that could be deleted is an Imac with a Power Pc and running Leopard i would apriciated if someone can help me,apple wants to charge me by the hour, since

  • Login Hook stops working once I've changed the username

    Hello. I need to change the usernames for a number of local accounts on a 10.5.8 mac. The accounts were set up by someone else who is no longer working at this education insitution and hasn't left any documentation. Currently when each user logs on,

  • Weird Audio Issues

    I currently work at a company who supports students who connect to Live Lessons using the Adobe Connect software. Recently quite a few calls have been received where a user has a Windows XP SP3 machine using either IE 8 or Firefox and the only way th

  • Org unit head of an org unit of an employee

    Hi all, I want to create an abap program where i have the personal number of a person. Now i want to find the org unit of that person, which I will find from PA0001. Now i want to get the position of the manager or the head of that org unit and from