Weird acting decimal values increment

I was wondering if anyone has come across this problem and what you did to fix:

When I try to increment or decrement a variable para.1, she retourne.1,.200,.300, etc.. After the first inc/decrement the third decimal point extend to however long (in pixels), I have my variable text that displays the value. So, if I start with a var that on the screen looks like: $$PrimaryRate$ $ and expand the area of text out beyond the length of the text string, then set it to 1 and then use a button to increment 1 para.1 consecutively, it produces something like the following: 1.1, 1.20000000000, 1.30000000000, etc. I tried just to shorten the text box to hide the additional decimals, but who does that until you hit the 10 s. Then, you lose the decimal point because of it being covered by the short text box. It's even worse that you go up more of places.

I think that what is needed is the ability to specify decimals allowed for a variable (value of 1, 2 or 3 places usually), similar to the PDF form field values, but I don't see anywhere this setting in CP8 (my current version). I'm just missing?

Also disappointed about not displaying variables is not my policy chosen, but that's another thread here somewhere...

Thank you

Alan

You can put these 2 functions at the head of the html page. Call the incUp() or incDn() in the JavaScript window.

function incUp()
{
var tempVal = Number (window.cpAPIInterface.getVariableValue ("myNumber"));
+= tempVal. 1;
window.cpAPIInterface.setVariableValue ("myNumber", tempVal.toFixed (1));
}

function incDn()
{
var tempVal = Number (window.cpAPIInterface.getVariableValue ("myNumber"));
tempVal =. 1;
window.cpAPIInterface.setVariableValue ("myNumber", tempVal.toFixed (1));
}

Tags: Adobe Captivate

Similar Questions

  • not accepting letterSpacing is not decimal values

    Im trying to give a format of specific text to my textFields. The problem here is that when I put the letterSpacing property with a decimal value, I get a result rounded space... 1.4 becomes returns 1 to 1.5 spacing px 2. It is very fustrating.

    Adobe documentation:

    "A number that represents the amount of space that is distributed evenly between all the characters.       The value specifies the number of pixels that are added in advance after each character.       The default value is null , which means that 0 pixels of letter spacing is used.      You can use decimal values such as 1.75 . »

    http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/Flash/text/TextFormat.h tml? filter_flash = cs5 & filter_flashplayer = 10.2 & filter_air = 2.6 #letterSpacing

    Copy the following code will show you my problem, you will have noticed the absence of values all about letterSpacing values inbetween.

    Paste inside the .fla file
    var stringtest:String = "Hello World";
    var numJump:Number = 20;
    var spacingVal:Number = 0;
    var index: Number = 0.2;

    var textFormat:TextFormat = new TextFormat();
    textFormat.font = "Arial";
    textFormat.size = 12;
    textFormat.letterSpacing = spacingVal;

    for (var i: int = 0; i < 25; i ++) {}
    var testText:TextField = new TextField();
    textFormat.letterSpacing = spacingVal;
    testText.defaultTextFormat = textFormat
    testText.width = stage.stageWidth;
    testText.text = stringtest +""+ textFormat.letterSpacing;
    testText.y = testText.textHeight * i;
    stage.addChild (testText);

    spacingVal += increment;
    spacingVal = (Math.round(spacingVal*10)) / 10;
    }

    Thanks in advance.

    you need to incorporate your policy is to use fractional letterspacing.  Add font Arial to your library and assign the class = ArialF.  You can then use:

    import flash.text.Font;

    var stringtest:String = "Hello World";
    var numJump:Number = 20;
    var spacingVal:Number = 0;
    var index: Number = 0.2;

    var textFormat:TextFormat = new TextFormat();
    var tf: do = new ArialF();
    textFormat.font = tf.fontName;
    textFormat.size = 12;
    textFormat.letterSpacing = spacingVal;

    for (var i: int = 0; i<25; i++)="">
    var testText:TextField = new TextField();
    textFormat.letterSpacing = spacingVal;
    testText.defaultTextFormat = textFormat;
    testText.width = stage.stageWidth;
    testText.embedFonts = true;
    testText.text = stringtest +""+ textFormat.letterSpacing;
    testText.y = testText.textHeight * i;
    stage.addChild (testText);

    spacingVal += increment;
    spacingVal = (Math.round(spacingVal*10)) / 10;
    }

  • return only the decimal value

    What function can I use to return only the decimal value of a formula

    (97 * 2.2) / 14 value returns 15.24

    I only want to use le.24

    Salvation is

    Use the formula - INT (formula)

    In the special case above:

    =(97*2.2)/14 - INT ((97*2.2)/14)

    You see two places to the right of the decimal separator in reason to be rounded off to the value real, in the shape of the cell to only show as two decimal places, either by setting the width of the cell close enough to force the rounding of the displayed value.

    Note that if the result is rounded (using the ROUND function) the actual value of the cell will be the rounded value. For the other two cases, the value displayed indicates only two decimal places, but the real value in the cell (and the additional calculations used by referring to this cell) is 0.242857142857144, which could lead to surprises in the results of the calculations downstream.

    Kind regards

    Barry

  • ascii conversion point floating decimal values

    Hello

    With the help of LV8.6, I'm working on a project in which I'm floating
    data point on port series as ASCII form and I need to convert it to sound
    appropriate decimal value.

    I tried the type cast to convert data and managed
    When the data were only a decimal value.

    But when these values are floating which is my
    data real i.e. 1.63, 3.41. I receive it as 1.11 (if it is 1.63), i.e.
    get only the first digit.

    But the data are received correctly on the screen of the chain and
    HyperTerminal, which means that communication is perfect, but the error is
    programming.

    kindly guide me what I have to do.

    Thank you

    It has simply changed format in the string conversion.

    Thanks for you advice

  • Decimal value not displayed after the decimal point in my excerpt

    The decimal value is not get rounded to the nearest integer in my voltage pack display box not switched. I changed his property in decimal, the problem continues. When I put a probe between the separator and the display area, I have correct values. How to get the correct value in the display area.

    See the color (color if you are UK) wire where you hang a probe... his orange (representing a number to floating point)... but the color of the indicator (another name for no dial-up power pack rack) is blue (U32, means is the representation of unsigned 32-bit integer)...!

    If that is the question... then try something... right click on the indicator (another name for no dial-up power pack rack) and select "representation > DBL", as shown below..! ' "

    It should work...!

  • How to get the decimal value of a string of international currency

    Hi all

    How to get the decimal values to a string of international currency.

    Finally, we get to the real problem.

    You can use location functions or write your own using string functions already mentioned...

    http://developer.BlackBerry.com/native/documentation/Cascades/device_platform/internationalization/

  • OBIEE Gauge - how to limit the decimal values in the footer area?

    Hello

    Is anyone have an idea on limiting decimal values in the foot of the gauge? In fact, I want to display the value of line as well as the value of the measure in the foot. I tried round, truncate etc and none of them actually worked.

    Please suggest some ideas.

    OBIEE Version: 11.1.1.7.0

    Gauge.PNG

    Gauge Achieved.PNG

    Thank you and best regards,
    Clinton

    Hello

    try to use

    Substring (cast (10, 233' tank) OF 1 FOR cast (Locate (',', cast (10, 233' Char)) as int) + 1).

    Change '10 233' by your column formula

    Felipe Idalgo

  • Used in forms for rule of rounding decimal values

    I am trying to determine what district to separate the rule using forms of round numbers decimal, extracted from the database to display in a shorter length field. Specifically, when a number is equidistant from its neighbours (e.g. 0.5 is equidistant between 0 and 1), which rule is used to determine if she is rounded upwards or downwards (see this for a reference of the standard rounding rules)? The online help documentation addresses rounded, but does not specify what rounding rule is used (for example half away from zero, even half or 'Banker of the borough', etc.).

    I tried to figure this out by trial and error, but make me inconsistent results. Here's my test case...

    In the two test cases:

    Database field is NUMBER (20.4)

    Form field is numeric, length 30

    Form field format mask, programmatically, set is FM999G999G999G999G999G999G999G999G999G999G999G990D90PR (i.e., round to 2 decimal places)

    The form field displays the value of the field database directly

    Test 1:

    Database field value is 1.4445

    Result: The screen displays the value as 1.44

    Test 2:

    Database field value is 1,445

    Result: The field of the screen shows the value of 1.45

    It's completely inconsistent. If 'half away from zero' or 'half of the odd' district were used, then the value 1 of the trial must be displayed as 1.45 (because the last 5 will round the previous 4 to 5 and repeat). On the other hand, if 'half zero' or 'half similarly' district were used, the value of Test 2 should be displayed as 1.44.

    I understand that the values stored in the form are not rounded, and that this will not necessarily errors of calculation. However, it is necessary for purposes of documentation that I determine what the current rule used to display rounded values.

    I use forms GR 11, 2.

    I thought about it (by another user). My hypothesis rounded is not accurate: 1.4445 would like to round up to 1.44 mathematically, not 1.45 because 1.0045 is closer to 1 than 2. Therefore, Forms uses the standard rounded technology Oracle, which is:

    1. If n is 0, then ROUND returns always 0 regardless of the integer .
    2. If n is negative, then ROUND (n, all) returns - ROUND (-n, whole).
    3. If n is positive, then ROUND (n, integer) = FLOOR (n * POWER(10, integer) + 0.5) * POWER (10, - all over)

    Source: incompatible tie rounding rule used in Oracle Forms to the decimal values - Stack Overflow

  • How to remove the decimal value (. 00) of the slider control

    Please ask me how to remove the decimal value (. 00) of the slider control and Add (if possible) % in after effects cs6.

    I guess you mean to animate text with a slider.

    Add a slider (options for expressions) to your text layer and then add this expression in your Source text:

    x = Math.Floor (effect ("Slider Control") ("Slider"));

    x+" %"

    That's all

  • Cut the decimal value in the input text

    Hi all

    JDeveloper version: iam using jdev version 11.1.1.6.2

    I need to cut the decimal when the user enters a decimal value.

    IAM a table with one column as editable.

    For example:-If the user enter 123,53 in the editable column, tab press ENTER key press or move to the next row, I want this value to be changed like 123.

    Guide me on how to do this. I tried with VO/OT Format, convert number, nothing helps me.

    Reg,

    Lakshmi.

    USE IT FOR YOUR NEED...

    that assumes that you have a table in which a column is ok SALARY, then add a ValueChangeListener on data from this column and AutoSubmit = true and also immediate = true and then write the code in valueChangeEvent as below...

    public void decimals (ValueChangeEvent valueChangeEvent)

    {

    RichInputText sal = (RichInputText) valueChangeEvent.getComponent ();

    s oracle.jbo.domain.Number = (oracle.jbo.domain.Number) valueChangeEvent.getNewValue (); for Type conversion

    int a = s.intValue ();

    sal.setValue (new oracle.jbo.domain.Number (his));

    RequestContext adfContext = RequestContext.getCurrentInstance ();

    adfContext.addPartialTarget (sal);

    }

    DO it this way, I hope that the problem will be solved.

  • Convert inches to decimal value fraction

    I get a lot of information required Tin Fractions (12 11/16 in., 2 1/8 inches, etc..) Is it possible in illustrator to convert decimal values?

    In illustrator, most dialog boxes can do math, then, first of all make the fraction. 5/8 serait.625 then enter the 12 whole number before the comma 12,625

    That's assuming that the dialog box can not handle the whole number and the fraction at the same time.

  • How to check the decimal value in the number field

    Is it possible to find the number of decimal digit is used.

    999.444
    444.45
    344.23
    33.666666666666

    Query provide rusult after the decimal value.

    Thank you.

    user-Keen wrote:
    Query provide rusult after the decimal value.

    Thank you.

    your_col - trunc(your_col)
    

    You have negative numbers?

    For negative values that you want to display?

    If only the decimal part, you can use ABS (col) - trunc (ABS (col))

    Published by: JAC on 4 April 2013 15:29

  • How to write decimal values to hex bytearray?

    Hello

    To order liighting of flash, I need to send binary a usb dongle data. The pakkage the dongle to receive looks lik this:

    7th 06 02 01 FF 00 FF 00... E7

    the first value is the start bit

    shild and third some info length

    4th is the label

    then we can send 512 bits (channels) from 0 to 255 Dmx value

    at the end one stop bit.

    So what I want is to write the values of the different channels in the device. First of all, I have to go to decimal to hexadecimal values by using the following code.

    function decimalToHex($decimal:int,_$padding:int_=_2):String {}

    var hex: String = Number ($decimal) m:System.NET.SocketAddress.ToString (16);

    While (hex.length < $padding)

    {

    Hex = '0' + hex;

    }

    Return hex.toUpperCase ();

    }

    Decimal var: int = 163;

    trace ("decimal:" + comma);

    var hex: String = decimalToHex (decimal, 2);

    trace ("hex:" + hex);

    It gives me hexadecimal values as in the example package.

    Now, I want to write this in a bytearray. I found this:

    var len:uint = 512;

    var outputByteArr:ByteArray = new ByteArray();

    outputByteArr.length = len;

    for (var i: int = 0; i < len; i ++) {}

    outputByteArr.writeByte (hex);

    }

    trace (outputByteArr);

    But it gives an error indicating that the writing. Byte needs to a number, not a string.

    When I change to:

    outputByteArr.writeByte (0xff);

    for example, it does not.

    Does anyone know how to properly change the decimal values that I can put in the Bytearray?

    Thanks in advance!

    Greetings,

    Piet

    You can use the writeMultiByte() method to write a string.

  • BitmapData with decimal values

    Hello

    I use bitmapdata feature with decimal value. But it takes only a round value. It's all possible ways to do... ?

    If I give as below,

    desBmp = new BitmapData (163,9, 192,9);

    It takes like,

    desBmp = new BitmapData (163, 192);

    I want the exact value to be considered as the width and height. Is there any option to do, of trying to help me.

    Kind regards

    Kelifaoui has.

    is not possible and there is no reason: you can't use a fraction of a pixel in the display.

    for smoothing, use the smooth parameter with the draw method.

  • Insert using TO_NUMBER does not seem to accept the decimal value

    Oracle 10g

    I'm trying to insert a decimal value in a table from another table oracle oracle. The column of the source table is a data type
        "PLOTSIZE10_30CM"    VARCHAR2(4 BYTE),
        "PLOTSIZE30_50CM"    VARCHAR2(4 BYTE),
        "PLOTSIZE50CM"       VARCHAR2(3 BYTE),
    The destination table contains the following:
        "PLOT_SIZE_10_30CM" NUMBER(7,0),
        "PLOT_SIZE_30_50CM" NUMBER(7,0),
        "PLOT_SIZE_50CM"    NUMBER(7,0),
    When I run the insert statement as the following decimal values are not inserted into the destination table.
    SQL> SELECT DISTINCT PLOTSIZE50CM FROM IMPORT_DATA WHERE STAND_ID = 23;
    
    PLO
    ---
    0.2
    
    SQL>
    SQL> INSERT INTO
      2  psp_plot_measurements
      3  ( species_major
      4  , plot_location_id
      5  , codominant_height
      6  , regen_density_primary_code
      7  , regen_density_secondary_code
      8  , PLOT_SIZE_10_30CM
      9  , PLOT_SIZE_30_50CM
     10  , PLOT_SIZE_50CM
     11  )
     12  SELECT DISTINCT species_major
     13       , '2'
     14       , height_codom
     15       , regen_prim
     16       , regen_sec
     17       , TO_NUMBER(plotsize10_30cm)
     18       , TO_NUMBER(plotsize30_50cm)
     19       , TO_NUMBER(plotsize50cm)
     20    FROM import_data
     21    WHERE stand_id = 23;
    
    1 row created.
    
    SQL>
    SQL> SELECT PLOT_SIZE_50CM FROM PSP_PLOT_MEASUREMENTS;
    
    PLOT_SIZE_50CM
    --------------
                 0
    See you soon
    Ben

    Hi Ben,

    If the destination table have the column as a Number (7.0) and then how you can store a decimal value.

    The destination table contains the following:

    "PLOT_SIZE_10_30CM" NUMBER(7,0),
    "PLOT_SIZE_30_50CM" NUMBER(7,0),
    "PLOT_SIZE_50CM"    NUMBER(7,0),
    

    Look at sample scenario-

    SQL> CREATE TABLE TEST1(COL NUMBER(7,0));
    
    Table created.
    
    SQL> CREATE TABLE TEST2(COL NUMBER(7,1));
    
    Table created.
    
    SQL> INSERT INTO TEST1(COL) VALUES(1.234);
    
    1 row created.
    
    SQL> INSERT INTO TEST2(COL) VALUES(1.234);
    
    1 row created.
    
    SQL> INSERT INTO TEST1(COL) VALUES(0.234);
    
    1 row created.
    
    SQL> INSERT INTO TEST2(COL) VALUES(0.234);
    
    1 row created.
    
    SQL> SELECT * FROM TEST1;
    
           COL
    ----------
             1
             0
    
    SQL> SELECT * FROM TEST2;
    
           COL
    ----------
           1.2
            .2
    
    SQL>
    

    If you want to store the decimal value, you must modify the destination table.

Maybe you are looking for

  • Camera Link or USB3

    I have a vision system using a color camera and frame grabber (1410).  As the future of cards near his end, prepare for obsolecense I think camera Camera Link or USB3-migrate.  I used the Camera Advisor and did not see an option USB3.  USB3 has the b

  • How can I disable on-board graphics?

    Hello. I have a Pavilion p6-2378 I install a dedicated graphics card. The instructions for the new States of car: "If your computer has an edge graphics capability, disable it on the motherboard by referring to the documentation for your computer." I

  • device driver

    I need the device driver for a vivitar vivicam20 how can I get it?

  • MS Paint block of work shows no full screen; cannot extend.

    I run XP Pro MS.  When I open MS Paint, the work area white occupies only a little more than a quarter of the total area of work.   The rest is grey and I can't expand the white canvas. Why is this and how do I solve this problem?  Stupid!

  • BlackBerry Smartphones Yahoo and Microsoft Exhange accounts on the same phone

    I just bought my first BlackBerry - BB 9000 "BOLD". It was easy to get set up to send and receive on my Yahoo account. After back and forth between AT & T and Microsoft Exchange server support, on behalf of my work is finally send and receive of the