Programmatically controlling multiple scale graph

Is there a way to programmatically duplicate the Y scale of an XY Graph and to associate it to one of the multiple plots.

> Is there a way to programmatically duplicate the Y scale of an XY
> Graph and to associate it to one of the multiple plots.
You can show and hide a scale, you while a VI is running, LV cannot
create a new scale.
Make your graph in advance to have the number of scales you need, then
programmatically hide the ones you don't need and show the ones you are
using. You can also set the Plot Active Y Scale to select which Y scale
is used for the plot.
Greg McKaskle

Similar Messages

  • Programmatically add multiple scales to graph

    On the front panel, I can choose "duplicate scale" "delete scale" to add/remove multiple scales a Graph control.  Can I do this programmatically,i.e., use the VI to adjust the number of scales on the graph?  The purpose is to have variable number of plots on the same graph, each having a different scale.

    I use this: Add the maximum number of needed scales per hand. You can swap sides to get a better look.
    To switch on/off a scale use the property "Active Y Scale" to select the scale and "yscale.visible" to switch on/off.
    I've written a small demo.  I hope it's usefull.
    Attachments:
    add_multiple_scales_to_graph.vi ‏24 KB

  • How to add (multiple) cursors programmatically in an XY graph?

     how to add (multiple) cursors programmatically in an XY graph?
    I am building an XY graph. then I would like to add cursors at certain locations (positioned on x axis) I determine through a program.
    How can I add cursors programatically?
    Thank you.

    Initialize a cluster array (CrsrList type) with as many cursors as you think you would ever need.   Setup your cursors dynamically, then delete the unused cursors (array elements) and then update your CursorList property.
    Message Edited by vt92 on 03-20-2009 04:04 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    cursors.PNG ‏5 KB

  • Display multiple Waveform-Graphs on a separate Frontpanel

    Hi there,
    I'm looking for a solution to display multiple waveform-graphs on a separate frontpanel.
    In my application I measure a number of channels (number is a user-input). The signals I want to display each in a separate waveform-graph, because they have different scales. They shall be arranged that way, that the user can switch them on and off or arranges them on the screen, while the application is running (measuring). He shall also be able to maximize all graphs or a graph window to have a closer look at the signals.
    I already tried several things.
    1. I placed the maximum number of graphs in a separate vi, which I start in my application and then switch the frontpanel on and off via a property-node. The values I also write via the references of the waveform-array, which I place in an array. This way I can also change the propertys of each plot (scale, xmin xmax, etc), but I always have all graphs on the screen (also the unused).
    2. I then tried to change the visible-property of the unused graphs, but I cannot scale and rearrange the remaining graphs to the full frontpanel-size, because this property is read-only.
    3. I placed just one waveform-graph in the vi and then start as many vis, as I need. This is cool, because I also can program the position and size of each frontpanel, so that they are arranged in a grid on the display, but all the graphs are separate and it is uncomfortable if the user had to arrange them separate. The windows need to be docked ore something like that.
    4. I tried to place the graph-vis in subpanels, but then I cannot change the position and size of the vis programmatically.
    Has anyone an idea, how to solve this?
    I am using LabView2009Sp1 Professional Development System
    Thanks Norman

    Thanks so far,
    I attached some examples of what I tried already.
    1. MaximumNumberOf Graphs - I show 6 graphs although only two are needed. I cannot rescale the used ones to the full screen size, because the property is read-only
    2. RescaledFrontpanel - I switch the unused graphs to invisible, resize the frontpanel to hide the unused graphs, but now the window is not zoomable
    3. GridOfWindows displays the desired grid of graphs in separate windows, but they don't stick together
    I hope this explains the situation better.
    Norman
    Attachments:
    multigraph.llb ‏136 KB

  • Multiple scales on Y with the one time axis

    Hi All,
    I am trying to make a multiple scale in Y-axis with the single x-axis in XY graph or waveform graph. I am tring to do this programetically but I am getting the error message"LabVIEW:  Invalid property value." . I have attached the VI for your reference .
    Please help me to plot multiple scale in Y-axis.
    Thanks
     

    Hi,
    Add the total Y  scales you need in XY graph.
    Then you can hide or make it visible  using XY graph Y Scale  property node.
    First you need to se the  'Active  Y Scale' property ,then  set any Scale property.
    You cant programmatically add Y scales ,you need to  add Manually and programmatically you can do anything on Y scales with  above instructions

  • Help needed in creating a multiple surface graph.

    Dear all,
    Thank you for taking the time to read my question.
    I have an equation with 3 variables.
    I have managed to plot 2 variable(and the result of the equation) on a 3d surface plot and now I am trying to plot the third one as multiple surfaces.
    More in detail, I am trying to plot the induced current in a coil of turns R, at a distance x from a High Voltage(High Current) conductor.
    You will see from my attached file that I have plotted 'Induced current', 'Radius from point x' and 'HV conductor Current'.
    I now wish to plot turns N (say 50, 100, 150, 200, 250 turns) as 5 multiple plots (one on top of the other).
    How can I do this, as I have checked the example files and have not found something very relevant on that. Also answers to similar questions are not very clear to me.
    I am also not quite sure that the surface plot I have is correct, as the valus of HV conductor Current (I) do not start from 500. The same happens for Radius From Point 'x' (R), as they start from 3,5 instead of 3.
    If I go to to CDgraph3D>>properties, I can see 4 more plots but they are definetely not what I would expect.
    I am trying to plot:
    Radius from point 'x' (R)= 3, 3.5, 4,...,5
    HV Conductor Current I = 500,600,...,1000
    # turns of coil N= 50, 100,...,250 (as 5 surface plots)
    and last Induced Current
    What am I doing wrong in my code?
    Thanks
    Alex
    Attachments:
    Parametric analysis of induction coil.vi ‏35 KB

    Good Morning,
    With some mentoring from the skilled LabVIEW Zealot that resides a few cubicles away, I have found how to access the property nodes on the 3D plot. Please find attached a VI that programmatically sets the scale of interest to 600-700. You can change the code to fit your needs.
    Many, many more details can be found at :
    http://forums.ni.com/ni/board/message?board.id=170&message.id=143663&requireLogin=False
    ( the VI should be in 8.0 this time.   )
    Regards,
    Mello
    Data Science Automation
    CTA, CLA, CPI
    SHAZAM!
    Attachments:
    Parametric%20analysis%20of%20induction%20coil[1][1].vi ‏39 KB

  • Creating multiple Line Graph having common values..

    Hi...
    I've created one application process for creating Multiple Line Graph.
    And i've integreted two tables in this graph, where values may be common for both the tables. In this case, for common values, instead of getting overlapped I'm getting scattered graph(its totally abnormal). Please help me if you 've any idea about this issue.....?
    Please go through the App Process and the output of the SQL query.
    In output of the query, in the NAME column "Feb-2010" is common.
    This is the SQL query OUTPUT:_
    TABLE 1
    NAME VALUE
    Sept-2009 100
    Oct-2009 95
    Nov-2009 98
    Feb-2010 97
    TABLE 2
    NAME VALUE
    Jan-2010 93
    Feb-2010 100
    Mar-2010 98
    Application Process :_
    DECLARE
    BEGIN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    OWA_UTIL.http_header_close;
    HTP.p ('<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>');
    HTP.p ('<anychart>');
    HTP.p ('<settings>');
    HTP.p ('<animation enabled="True"/>');
    HTP.p ('</settings>');
    HTP.p ('<charts>');
    HTP.p ('<chart plot_type="CategorizedVertical">');
    HTP.p ('<data_plot_settings default_series_type="Line">');
    HTP.p ('<line_series>');
    HTP.p ('<marker_settings>');
    HTP.p ('<marker type="None" />');
    HTP.p ('<states>');
    HTP.p ('<hover>');
    HTP.p ('<marker type="Diamond" />');
    HTP.p ('</hover>');
    HTP.p ('</states>');
    HTP.p ('</marker_settings>');
    HTP.p ('<tooltip_settings enabled="True">');
    HTP.p ('<format>Year {%Name}{enabled:false} {%SeriesName} - {%Value}{numDecimals:0}%</format>');
    HTP.p ('</tooltip_settings>');
    HTP.p ('<effects enabled="True">');
    HTP.p ('<drop_shadow enabled="False" />');
    HTP.p ('<bevel enabled="true" distance="1" blur_x="2" blur_y="2" />');
    HTP.p ('</effects>');
    HTP.p ('<line_style>');
    HTP.p ('<line thickness="3" /> ');
    HTP.p ('</line_style>');
    HTP.p ('</line_series>');
    HTP.p ('</data_plot_settings>');
    HTP.p ('<chart_settings>');
    HTP.p ('<title enabled="true">');
    HTP.p ('<text>Avg. %App. Uptime per month </text>');
    HTP.p ('</title>');
    HTP.p ('<axes>');
    HTP.p ('<y_axis>');
    HTP.p ('<title>');
    HTP.p ('<text>Value</text> ');
    HTP.p ('</title>');
    HTP.p ('<scale minimum="90" maximum="101" major_interval="1" />');
    HTP.p ('<labels>');
    HTP.p ('<format>${%Value}{numDecimals:0}</format>');
    HTP.p ('</labels>');
    HTP.p ('<axis_markers>');
    HTP.p ('</axis_markers>');
    HTP.p ('</y_axis>');
    HTP.p ('<x_axis tickmarks_placement="Center">');
    HTP.p ('<title enabled="False" /> ');
    HTP.p ('</x_axis>');
    HTP.p (' </axes>');
    HTP.p ('</chart_settings>');
    HTP.p ('<data>');
    FOR ObjRecord IN (select DISTINCT(K_OBJECT.OBJECT_ID) as OBJECT_ID,name from K_OBJECT, K_OBJ_TYPE_ASP_REL where K_OBJECT.OBJECT_ID=K_OBJ_TYPE_ASP_REL.OBJECT_ID and K_OBJ_TYPE_ASP_REL.OBJECT_TYPE_ID=1)
    LOOP
    HTP.p ('<series name="'|| ObjRecord.name ||'">');
    FOR MonthlyValueRecord IN (select NAME,VALUE
    from K_REPORT_RUN,K_ASPECT_VALUES,K_ASP_TIM_RPT_REL
    where K_REPORT_RUN.RUN_ID=K_ASP_TIM_RPT_REL.RUN_ID
    and
    K_ASPECT_VALUES.ASPECT_VALUE_ID=K_ASP_TIM_RPT_REL.ASPECT_VALUE_ID
    and
    K_ASP_TIM_RPT_REL.ASPECT_ID=1
    and
    K_ASP_TIM_RPT_REL.OBJECT_ID=ObjRecord.OBJECT_ID
    order by K_REPORT_RUN.STARTTIME)
    LOOP
    HTP.p ('<point name="'|| MonthlyValueRecord.name ||'" y="'|| MonthlyValueRecord.value ||'" />');
    END LOOP;
    HTP.p ('</series>');
    END LOOP;
    HTP.p ('</data>');
    HTP.p ('</chart>');
    HTP.p ('</charts>');
    HTP.p ('</anychart>');
    htmldb_application.g_unrecoverable_error := true;
    END;
    Edited by: user12873839 on Apr 9, 2010 3:58 AM
    Edited by: user12873839 on Apr 9, 2010 4:02 AM
    Edited by: user12873839 on Apr 9, 2010 8:00 AM

    >
    Help Needed Urgent.....
    >
    That is one surefire way to not get any help and certainly not urgently. I suggest that you amend the title of your post to something that reflects the actual issue. This will also help anyone with similar issues to find the thread.
    When posting code please put {noformat}{noformat} (with the curly brackets and the word code in lower case) above and below it to preserve formatting like this...
    {noformat}{noformat}
    SELECT *
    FROM emp
    {noformat}{noformat}
    This will be displayed on the forum like this...SELECT *
    FROM emp
    Cheers
    Ben                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Chart w/ multiple scales

    Post Author: andeezlemoyo
    CA Forum: Charts and Graphs
    Hi All,
    I'm using CR XI Release 2. Is it possible to create a chart with multiple scales? Or in other words, plot multiple measures on a single chart.
    Thanks,
    Andy

    Post Author: Dan3D
    CA Forum: Charts and Graphs
    Yes. In the Chart selection tab, start out with a "Dual-Y" chart. This will produce a bar/line/area chart that has a y1 scale on the left and y2 scale on the right. Each measure can be mapped to either Y1 or Y2.

  • Can I programmatically control an xbox 360 console from a PC using a USB cable?

    I have an application that may require LabVIEW, some software normally associated with LabVIEW or both...
    I would like to be able to programmatically control an Xbox 360, via a PC, and through the use of a USB cable connecting both. I have setup a separate Xbox 360 console as a "dedicated server" for my gaming clan. I would like to be able to have the PC issue scripted commands according to a schedule, that will cause the console to power up, start the specific game (disk in the machine already), and then proceed through a number of Xbox 360 controller button actuations to cause the game to essentially be ready to play.
    If possible, I would like to find software that I could install on my PC (currently run with a Windows XP SP2 OS, but I have access to many versions of Windows and also Linux and soon, Solaris Unix).
    I have tried using various Infrared devices that connect to and are controlled by my PC, but none so far have allowed the infrared signals to work once the game is launched (apparently, only controller signals generated through a USB cable or through RF from a wireless Xbox 360 remote work once the game is launched - and that probably because the IR signals are meant to control the console as a media device).
    I would appreciate any direction that you 'all could offer. Thanks in advance!

    Thanks for your replies everyone, and thanks to NI for this great forum!
    The last solution appears to be pretty close to what I'd like to do. If I understand you Robert, I would attach a DAQ to my PC via USB and would control that device via software, then the DAQ connects to a digital output controlled relay (looks multiple wires, and screw-on connections) and then there would be separate wires connecting 'channels' (my term) from the relay to individual button wires inside of the gaming controller? The signals coming from the controller following this would therefore appear as normal.
    If this is correct, could you suggest any specific devices for this? I see that NI makes several USB DAQ's includng the USB-6501, 6008, and 6009. I also have seen many digital output controlled relays available from different vendors. I could use some assistance with the finer points for choosing the correct ones to purchase.
    In case it makes any difference although the controller has analog functions my requirements are for only the digital buttons only as I would simply be proceeding through the Console's menu (left, right, up, down, enter/select, etc.), launching the game, and then within the game continuing to choose among the game's menu items, ultimately according to a script. So, I don't see any need to be able to actuate either of the 'sticks' which are analog in nature.
    Thanks!

  • Need Help Audio Amplitude Output Controlling Multiple Parameters

    What I am trying to accomplish here is having one audio track effect multiple parameters, obviously all of the parameters would be slightly different so I'm not just making duplicates of one object.
    Anyways, is there a way to use the audio amplitude to effect multiple parameters. I want to only have to analyze the audio one time, and then have that analyzation control multiple things. I've tried a Rig, but that doesn't seem to give me the options I need to configure this.

    First of all, it doesn't "hurt" anything to have mulitple audio behaviors added to parameters. It doesn't duplicate the audio in any way. What IS the PITA, is you really have to wait for the audio behaviors to "process" (all the way to 100%) because if they're interupted, they'll often NOT finish creating the keyframes all the way to the end of the project.
    You can easily add Link Behaviors to anything that is already under audio pararmeter control. You can chain them indefinitely.
    However, one good example that might be coincidentally convenient is to create a Number Generator, turn off Animate and link the audio to the Value. Make sure, in the audio behavior to set the Scale value to the maximum value you will need (default is 1 and number values from 0 to 1 are not terribly useful for most things in Motion.)  You can subsequently link other parameters to the Number's Value (Object.Numbers.Value from the Source Parameter dropdown in the Link Behavior). You can use the Value offset and Scale parameters in the link behavior to "shape" the behavior for each subsequent parameter under control. The sometimes useful side effect is that you have a visual number to monitor (you can set its opacity to 0 to hide it for the final project appearance.)
    For the image below, I created two Number generators and linked the same audio file to each, setting the left number value to the Left Channel of the audio and the right number value to the Right Channel of the audio. I created a small rectangle and created two Replicators off of it (Shape: Rectangle/Tile Fill/Columns 1/Rows 15/ Origin Bottlom). I used Color Over Pattern to color the "audio meter" effect and a Sequence Replicator with an Opacity parameter, Sequencing To, Traversal Custom and to the Location parameter, I linked each back to the corresponding Number Value (Scaled to 100 for percent in the Audio behaviors). The Link behavior to each Location has the Value Offset set to -100 [location works from -100% to 0%].
    You could link any number of parameters to the Number Values, and not have the audio parameters re-analyze all the time.

  • Using airport utility to control multiple speakers at the same time

    Can I use the aiport utility on my Ipod to control multiple speakers/airport express units at the same time?  I am able to do this directly in ITunes but when I use my Ipod as the "remote" by using the airport utility it only seems to allow me to play music on one set of speakers at a time.  If I stream music to one set of speakers and then select a different set it stops the music that was going to the first set in order to stream it to the second set.  I hope that this is just user error and not a limitation of the airport utility because I just purchased a brand new Ipod in order to be able to do this (airport utility wasn't compatible with me 2nd Gen).  Thanks in advance for any help!

    If you have not already done so, now would be a good time to perform a complete power cycle of the entire network.
    Power off all devices...modem, routers, computers, etc....in any order that you wish
    Wait a few minutes
    Power up the modem first, and let it run 2-3 minutes by itself
    Power of the wireless router connected to the modem next the same way
    Power of the other AirPort routers one at a time about a minute apart
    Keep powering up devices one at a time about a minute apart until the entire network is back up
    Check the network

  • Using a single remote app to control multiple Apple TVs

    Can you use the remote application which is loaded on my IPad 2 to control multiple ATVs independently? If so, how is this done.

    Yes you can.
    I have a mixture of AppleTV 1 and 2 and several itunes libraries.
    The top level screen lists all devices/itunes libraries - when you choose one it enters the control mode for that and app tends to restart with that iTunes library or AppleTV device.  Press icon that looks lie 2 overlapping squares with rounded edges on top left of display to get back to top level screen.
    AC

  • Control multiple apple tv units with 1 remote app

    Is it possible to control multiple apple TV units with 1 remote app on an iPhone/iPad? I have apple tv at home, set up under my own personal apple id. I have an apple tv unit at work which I want to use, but that uses our work apple id. can I control both units without having to log out of my personal id and then log into the work one?

    On the ATV menu itself there is an option to name the ATV.
    Does that not do it for you?

  • Problem with chart/grap​h multiple scales

    I have a chart with multiple scales. If I turn the visiblity off for some of the scales and then turn them back on they are not in the correct order on the chart. I have attached a program that I used to recreate the problem.
    Please advise.
    Thanks
    Attachments:
    Possible_bug.vi ‏36 KB

    The only solution I can think of is to make all the scales invisible then make them visible in the order you want. I have modified your code to do this and added code to speed up the processing by disabling the front panel updates.
    Attachments:
    LV61_Possible_bug[1].vi ‏56 KB

  • Scroll Bar Controlling multiple movieclips?

    Instead of a scroll bar just controlling one movieclip..How could we get it to control multiple movieclips?
    public class MainScroll extends Sprite
              //private var mc_content:Sprite;
              private var content_mc:MovieClip;
              private var content2_mc:MovieClip;
              private var _scrollBar:FullScreenScrollBar;
              //============================================================================================================================
              public function MainScroll()
              //============================================================================================================================
                   addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
              //============================================================================================================================
              private function init():void
              //============================================================================================================================
                   SWFWheel.initialize(stage);
                   //_copy = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque quam leo semper non sollicitudin in eleifend sit amet diam. "; 
                   content_mc = new mc_content();
                   content2_mc = new mc_content2();
                   content_mc.x = 110;
                   content_mc.y = 29;
                   content2_mc.x = 10
                   content2_mc.y = 29
                   addChild(content_mc);
                   addChild(content2_mc);
                   // Scrollbar code 
                   // Arguments: Content to scroll, track color, grabber color, grabber press color, grip color, track thickness, grabber thickness, ease amount, whether grabber is "shiny"
                   _scrollBar = new FullScreenScrollBar(content_mc, 0x000000, 0x408740, 0x73C35B, 0xffffff, 15, 15, 4, true);
                   addChild(_scrollBar);
              //============================================================================================================================
              private function onAddedToStage(e:Event):void
              //============================================================================================================================
                   init();
                   removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);

    Ok,
    Here is that code:
         import flash.display.*
         import flash.events.*;
         import flash.geom.Rectangle;
         import gs.OverwriteManager;
         import gs.TweenFilterLite;
         public class FullScreenScrollBar extends Sprite
              private var _content:DisplayObjectContainer;
              private var _trackColor:uint;
              private var _grabberColor:uint;
              private var _grabberPressColor:uint;
              private var _gripColor:uint;
              private var _trackThickness:int;
              private var _grabberThickness:int;
              private var _easeAmount:int;
              private var _hasShine:Boolean;
              private var _track:Sprite;
              private var _grabber:Sprite;
              private var _grabberGrip:Sprite;
              private var _grabberArrow1:Sprite;
              private var _grabberArrow2:Sprite;
              private var _tH:Number; // Track height
              private var _cH:Number; // Content height
              private var _scrollValue:Number;
              private var _defaultPosition:Number;
              private var _stageW:Number;
              private var _stageH:Number;
              private var _pressed:Boolean = false;
              //============================================================================================================================
              public function FullScreenScrollBar(c:DisplayObjectContainer, tc:uint, gc:uint, gpc:uint, grip:uint, tt:int, gt:int, ea:int, hs:Boolean)
              //============================================================================================================================
                   _content = c;
                   _trackColor = tc;
                   _grabberColor = gc;
                   _grabberPressColor = gpc;
                   _gripColor = grip;
                   _trackThickness = tt;
                   _grabberThickness = gt;
                   _easeAmount = ea;
                   _hasShine = hs;
                   init();
                   OverwriteManager.init();
              //============================================================================================================================
              private function init():void
              //============================================================================================================================
                   createTrack();
                   createGrabber();
                   createGrips();
                   addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
                   _defaultPosition = Math.round(_content.y);
                   _grabber.y = 0;
              //============================================================================================================================
              public function kill():void
              //============================================================================================================================
                   stage.removeEventListener(Event.RESIZE, onStageResize);
              //============================================================================================================================
              private function stopScroll(e:Event):void
              //============================================================================================================================
                   onUpListener();
              //============================================================================================================================
              private function scrollContent(e:Event):void
              //============================================================================================================================
                   var ty:Number;
                   var dist:Number;
                   var moveAmount:Number;
                   ty = -((_cH - _tH) * (_grabber.y / _scrollValue));
                   dist = ty - _content.y + _defaultPosition;
                   moveAmount = dist / _easeAmount;
                   _content.y += Math.round(moveAmount);
                   if (Math.abs(_content.y - ty - _defaultPosition) < 1.5)
                        _grabber.removeEventListener(Event.ENTER_FRAME, scrollContent);
                        _content.y = Math.round(ty) + _defaultPosition;
                   positionGrips();
              //============================================================================================================================
              public function adjustSize():void
              //============================================================================================================================
                   this.x = _stageW - _trackThickness;
                   _track.height = _stageH;
                   _track.y = 0;
                   _tH = _track.height;
                   _cH = _content.height + _defaultPosition;
                   // Set height of grabber relative to how much content
                   _grabber.getChildByName("bg").height = Math.ceil((_tH / _cH) * _tH);
                   // Set minimum size for grabber
                   if(_grabber.getChildByName("bg").height < 35) _grabber.getChildByName("bg").height = 35;
                   if(_hasShine) _grabber.getChildByName("shine").height = _grabber.getChildByName("bg").height;
                   // If scroller is taller than stage height, set its y position to the very bottom
                   if ((_grabber.y + _grabber.getChildByName("bg").height) > _tH) _grabber.y = _tH - _grabber.getChildByName("bg").height;
                   // If content height is less than stage height, set the scroller y position to 0, otherwise keep it the same
                   _grabber.y = (_cH < _tH) ? 0 : _grabber.y;
                   // If content height is greater than the stage height, show it, otherwise hide it
                   this.visible = (_cH + 8 > _tH);
                   // Distance left to scroll
                   _scrollValue = _tH - _grabber.getChildByName("bg").height;
                   _content.y = Math.round(-((_cH - _tH) * (_grabber.y / _scrollValue)) + _defaultPosition);
                   positionGrips();
                   if(_content.height < stage.stageHeight) { stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelListener); } else { stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelListener); }
              //============================================================================================================================
              private function positionGrips():void
              //============================================================================================================================
                   _grabberGrip.y = Math.ceil(_grabber.getChildByName("bg").y + (_grabber.getChildByName("bg").height / 2) - (_grabberGrip.height / 2));
                   _grabberArrow1.y = _grabber.getChildByName("bg").y + 8;
                   _grabberArrow2.y = _grabber.getChildByName("bg").height - 8;
              //============================================================================================================================
              // CREATORS
              //============================================================================================================================
              //============================================================================================================================
              private function createTrack():void
              //============================================================================================================================
                   _track = new Sprite();
                   var t:Sprite = new Sprite();
                   t.graphics.beginFill(_trackColor);
                   t.graphics.drawRect(0, 0, _trackThickness, _trackThickness);
                   t.graphics.endFill();
                   _track.addChild(t);
                   addChild(_track);
              //============================================================================================================================
              private function createGrabber():void
              //============================================================================================================================
                   _grabber = new Sprite();
                   var t:Sprite = new Sprite();
                   t.graphics.beginFill(_grabberColor);
                   t.graphics.drawRect(0, 0, _grabberThickness, _grabberThickness);
                   t.graphics.endFill();
                   t.name = "bg";
                   _grabber.addChild(t);
                   if(_hasShine)
                        var shine:Sprite = new Sprite();
                        var sg:Graphics = shine.graphics;
                        sg.beginFill(0xffffff, 0.15);
                        sg.drawRect(0, 0, Math.ceil(_trackThickness/2), _trackThickness);
                        sg.endFill();
                        shine.x = Math.floor(_trackThickness/2);
                        shine.name = "shine";
                        _grabber.addChild(shine);
                   addChild(_grabber);
              //============================================================================================================================
              private function createGrips():void
              //============================================================================================================================
                   _grabberGrip = createGrabberGrip();
                   _grabber.addChild(_grabberGrip);
                   _grabberArrow1 = createPixelArrow();
                   _grabber.addChild(_grabberArrow1);
                   _grabberArrow2 = createPixelArrow();
                   _grabber.addChild(_grabberArrow2);
                   _grabberArrow1.rotation = -90;
                   _grabberArrow1.x = ((_grabberThickness - 7) / 2) + 1;
                   _grabberArrow2.rotation = 90;
                   _grabberArrow2.x = ((_grabberThickness - 7) / 2) + 6;
              //============================================================================================================================
              private function createGrabberGrip():Sprite
              //============================================================================================================================
                   var w:int = 7;
                   var xp:int = (_grabberThickness - w) / 2;
                   var t:Sprite = new Sprite();
                   t.graphics.beginFill(_gripColor, 1);
                   t.graphics.drawRect(xp, 0, w, 1);
                   t.graphics.drawRect(xp, 0 + 2, w, 1);
                   t.graphics.drawRect(xp, 0 + 4, w, 1);
                   t.graphics.drawRect(xp, 0 + 6, w, 1);
                   t.graphics.drawRect(xp, 0 + 8, w, 1);
                   t.graphics.endFill();
                   return t;
              //============================================================================================================================
              private function createPixelArrow():Sprite
              //============================================================================================================================
                   var t:Sprite = new Sprite();               
                   t.graphics.beginFill(_gripColor, 1);
                   t.graphics.drawRect(0, 0, 1, 1);
                   t.graphics.drawRect(1, 1, 1, 1);
                   t.graphics.drawRect(2, 2, 1, 1);
                   t.graphics.drawRect(1, 3, 1, 1);
                   t.graphics.drawRect(0, 4, 1, 1);
                   t.graphics.endFill();
                   return t;
              //============================================================================================================================
              // LISTENERS
              //============================================================================================================================
              //============================================================================================================================
              private function mouseWheelListener(me:MouseEvent):void
              //============================================================================================================================
                   var d:Number = me.delta;
                   if (d > 0)
                        if ((_grabber.y - (d * 4)) >= 0)
                             _grabber.y -= d * 4;
                        else
                             _grabber.y = 0;
                        if (!_grabber.willTrigger(Event.ENTER_FRAME)) _grabber.addEventListener(Event.ENTER_FRAME, scrollContent);
                   else
                        if (((_grabber.y + _grabber.height) + (Math.abs(d) * 4)) <= stage.stageHeight)
                             _grabber.y += Math.abs(d) * 4;
                        else
                             _grabber.y = stage.stageHeight - _grabber.height;
                        if (!_grabber.willTrigger(Event.ENTER_FRAME)) _grabber.addEventListener(Event.ENTER_FRAME, scrollContent);
              //============================================================================================================================
              private function onDownListener(e:MouseEvent):void
              //============================================================================================================================
                   _pressed = true;
                   _grabber.startDrag(false, new Rectangle(0, 0, 0, _stageH - _grabber.getChildByName("bg").height));
                   stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMoveListener, false, 0, true);
                   TweenFilterLite.to(_grabber.getChildByName("bg"), 0.5, { tint:_grabberPressColor } );
              //============================================================================================================================
              private function onUpListener(e:MouseEvent = null):void
              //============================================================================================================================
                   if (_pressed)
                        _pressed = false;
                        _grabber.stopDrag();
                        stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMoveListener);
                        TweenFilterLite.to(_grabber.getChildByName("bg"), 0.5, { tint:null } );
              //============================================================================================================================
              private function onMouseMoveListener(e:MouseEvent):void
              //============================================================================================================================
                   e.updateAfterEvent();
                   if (!_grabber.willTrigger(Event.ENTER_FRAME)) _grabber.addEventListener(Event.ENTER_FRAME, scrollContent, false, 0, true);
              //============================================================================================================================
              private function onTrackClick(e:MouseEvent):void
              //============================================================================================================================
                   var p:int;
                   var s:int = 150;
                   p = Math.ceil(e.stageY);
                   if(p < _grabber.y)
                        if(_grabber.y < _grabber.height)
                             TweenFilterLite.to(_grabber, 0.5, {y:0, onComplete:reset, overwrite:1});
                        else
                             TweenFilterLite.to(_grabber, 0.5, {y:"-150", onComplete:reset});
                        if(_grabber.y < 0) _grabber.y = 0;
                   else
                        if((_grabber.y + _grabber.height) > (_stageH - _grabber.height))
                             TweenFilterLite.to(_grabber, 0.5, {y:_stageH - _grabber.height, onComplete:reset, overwrite:1});
                        else
                             TweenFilterLite.to(_grabber, 0.5, {y:"150", onComplete:reset});
                        if(_grabber.y + _grabber.getChildByName("bg").height > _track.height) _grabber.y = stage.stageHeight - _grabber.getChildByName("bg").height;
                   function reset():void
                        if(_grabber.y < 0) _grabber.y = 0;
                        if(_grabber.y + _grabber.getChildByName("bg").height > _track.height) _grabber.y = stage.stageHeight - _grabber.getChildByName("bg").height;
                   _grabber.addEventListener(Event.ENTER_FRAME, scrollContent, false, 0, true);
              //============================================================================================================================
              private function onAddedToStage(e:Event):void
              //============================================================================================================================
                   stage.addEventListener(Event.MOUSE_LEAVE, stopScroll);
                   stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelListener);
                   stage.addEventListener(Event.RESIZE, onStageResize, false, 0, true);
                   stage.addEventListener(MouseEvent.MOUSE_UP, onUpListener, false, 0, true);
                   _grabber.addEventListener(MouseEvent.MOUSE_DOWN, onDownListener, false, 0, true);
                   _grabber.buttonMode = true;
                   _track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true);
                   removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
                   _stageW = stage.stageWidth;
                   _stageH = stage.stageHeight;
                   adjustSize();
              //============================================================================================================================
              private function onStageResize(e:Event):void
              //============================================================================================================================
                   _stageW = stage.stageWidth;
                   _stageH = stage.stageHeight;
                   adjustSize();

Maybe you are looking for