Limiting entry in a JTextField to numeric value and "%" value

Hi,
I want to allow the user to enter numeric value and % value
How can I limit the user to make such a entry in JTextField

Use the code given below to make your textfield accept only numeric values. You can modify itto include % values too.
textField.setDocument( new TextFieldVerifier() );     
class TextFieldVerifier extends PlainDocument {
public void insertString( int offset, String str, AttributeSet attSet ) throws BadLocationException {           
boolean valid = false;          
if ( str == null ) {
return;
String old = getText( 0, getLength() );
/* insert the new string at the given offset, into the old string */     
String newStr = old.substring( 0, offset ) + str + old.substring( offset );
try {
/* check if the new string is a valid integer */
Integer.parseInt( newStr );               
valid = true;
} catch ( NumberFormatException ne ) {          
/* invalid, if not an integer */
valid = false;
Toolkit.getDefaultToolkit().beep();           
if ( valid ) {
super.insertString( offset, str, attSet );
}

Similar Messages

  • How can I validate numeric values in a text field?

    Hi
    Once more I have a problem.
    I have a field in which the user should enter 10 digits in the pattern 999999-9999. The field must only contain numeric data and must be exactly 10 characters. I have a validation script on the print button, that prevent printing if required fields are empty or not properly filled out.
    I have tried two ways to work this out, and I'm not satisfied with any of them, as I can still print despite of validation scripts and warning messages.
    1.
    I set the field to numeric, limited to 11 characters.
    Display pattern num{999999-9999}, edit pattern num{999999-9999} and validation pattern num{999999-9999}
    Problems using this solution: When I type 11 digits in the field (ex.12345612345) I get a warning message and 12.345.612.
    But when I type 9 digts (ex. 123456-123 or 123456123) I get no warning message and 000000-0000 or 012345-6123
    If I type alphabetical characters (ex. 123456-abcd) I get no warning message and 000000-0000.
    2.
    I set the field to text field, limited to 11 characters.
    Display pattern text{999999-9999}, edit pattern text{999999-9999} and validation pattern text{999999-9999}
    Now when I type 11 digits in the field (ex.12345612345) I get no warning message and 12345612345.
    When I type 9 digts (ex. 123456-123) I get no warning message and 123456-123
    When I type 9 digts (ex. 123456123) I get a warning message and 123456123
    If I type alphabetical characters (ex. 123456-abcd) I get a warning message and 123456-abcd.
    It works slightly better as a text field, but I am not satisfied at all.
    Has anyone a solution to this?
    Additional I would also like the hyphen to emerge automatically when typing.
    K

    I just want to summarize my experience.
    I found a related discussion here: http://forums.adobe.com/message/2513720#2513720.
    Putting the pieces together I came up with this solution.
    form1.subform.TextField1::exit - (JavaScript, client)
    var      
    myRegex = /\d{6}\-\d{4}/;
    var   
    singleDigits = [0,1,2,3,4,5,6,7,8,9]; // array for single digit check
    if   
    (this.rawValue != null || this.rawValue != ''){ // only if the field has a value...
         if (!this.rawValue.match(myRegex)){ // and it doesnt match the pattern (i.e. 2 digits)
         this.rawValue 
    = ''; // clear the field
         xfa.host.setFocus( 
    this); // set focus back to the field
         xfa.host.messageBox('Error: Pattern Conflict. Please use the pattern 999999-9999.'); 
    // enter any message you wish here
    Kirstine

  • How do I keep fields hidden until a numeric value is entered including 0

    I have a field that keeps other fields hidden until a numeric value is entered into it...
    My current script is:
    var showHide = event.target.value > 0
    ? display.visible : display.hidden;
    this.getField("Increase DecreaseRow1").display = showHide;
    this.getField("Amended BudgetRow1").display = showHide;
    And it works except when a "0" amount is entered, the fields remain hidden. I need to allow the "0" amount to unhide the fields so, I've tried changing it to:
    var showHide = event.target.ValueAsString != ""
    ? display.visible : display.hidden;
    this.getField("Increase DecreaseRow1").display = showHide;
    this.getField("Amended BudgetRow1").display = showHide;
    but that makes the fields I want hidden visible, even without an entry.
    Any ideas?
    I'm using Adobe Acrobat XI Pro.
    Thanks in advance for any help!

    I use the custom JavaScript validation of:
    if(event.value == 0) event.value = "";
    for the field with the calculation. If one uses a currency symbol or the percentage format then additional coding is needed to set the format to a number without the currency symbol for zero values and the desired format for the currency or percentage.

  • Percentages from Numerical Values Assigned to Text

    I am new to Excel and am having trouble with what I thought would be a simple formula.  I am trying to create a formula that will find the percentage of text in a single column.  Example, I am looking for the percentage of "Yes" to "No"
    values in a column, and am not sure if I should assign a numerical value and then try and create a formula that will calculate the percentage. I have had no luck so far, any help would be much appreciated.

    Assuming the yes/no values are in column A, the following formula with give the percentage of 'yes' entries in that column:
    =COUNTIF(A:A,"yes")/COUNTA(A:A)*100
    If you format the result as %, omit the *100.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • If..then formula requiring numeric values

    Post Author: scd07
    CA Forum: Formula
    I have the need to create a formula that will analyze one field in order to determine the value of another field.  Below is a formula that follows the correct logic, but as it is a Boolean formula, it returns a  True/False answer, instead of the correct (numeric) data.  I do not know how to rephrase the formula that will return the numeric value.
    if {TLORDER.BILL_NUMBER} = previous ({TLORDER.BILL_NUMBER}) then {TLORDER.TOTAL_CHARGES} = 0 else {TLORDER.TOTAL_CHARGES} = {TLORDER.TOTAL_CHARGES}
    I appreciate any help!  Thank you!

    Post Author: scd07
    CA Forum: Formula
    Ok, this formula also works well, and I can now go in and create a Running total.  But again, I barely know what I am doing!  Here is what I put in the formula:
    Whileprintingrecords;Currencyvar Amount;
    if {LEGSUM.LS_TRIP_NUMBER}={LEGSUM.LS_TRIP_NUMBER} then Amount := Amount + {@Total Charges}
    This is providing a running total of the Last entry for each group.  It is not totaling All the records within the group.  I certainly appreciate your help with this.  I am actually a network person being impressed into reporting duty, and I am definitely experiencing "Trial by fire".  Thanks!
    Sara

  • Problem in spring rich client with numeric value

    I am facing a problem in spring rich client.
    I have a text field of NumericJTextField type which extends JTextField and it is storing value of long type.
    In one constructor of this NumericJTextField ,we are creating new instance of NumericDocument which extends PlainDocument.
    We are alos using document filter.
    My problem is that,when i enter a numeric value starting with 0 for ex: 0123 then at the time of saving,
    it automatically converts this numeric value into something else like 83 or 9 etc.
    I dont know how and where this is happenning?
    can anyone help mme in this?
    Thanks!

    It's happening somewhere in the Spring code, where it translates a string into a number. Apparently it treats strings of digits which start with a zero as octal. (You know what that means now, right?)
    I don't know much about Spring, but this isn't a Spring forum so I'm free to post my uneducated wild guesses here. Quite possibly this is a Spring FAQ which you would find on the Spring website.

  • Two strings and a numeric value to write to a measurement file

    Hi all, I need to write two string values and a number value to file. I made a basic VI showing what is needed. I figured to cheat a little by sending my time stamp to the comment node. I then converted the id string to a decimal number and merged it to my numeric value. All is great with the output in Excel, accept my ID string dropped the last two digits and replaced them with a zero. Even if I used a numeric constant with this same value, it replaces the last to with zero's. The problem seems to reside with the write to measurement file VI. If I open it directly with wordpad it saves it as 2.602189E+8. Any ideas to save these three values?   Thanks
    Gerald

    When you use one of the Express VIs, you are limited to what you can do. The Write to Measurement File expects to writing measurements (numerics) and not string constants so eveything gets converted to floating point. You could probably modify it but using the lower level file I/O functions is just as simple. Here's a modification. I put the file write inside the loop because I would assume you want every value written. With your example, you would only save the very last iteration. If you do only want to save the last result, then it can be suitably modified.
    Attachments:
    time_insert_mod.vi ‏15 KB

  • Looking for help with javascript to autofill checkboxes based on a numeric value.

    I have a numeric field that I would like to have 1 - checkbox
    out of five autofilled based on a numeric value.
    For instance the numeric value is TotalPoints
    If the TotalPoints Value is >10 autofill this checkbox
    If the TotalPoints Value is 10 - 19 autofill this checkbox
    If the TotalPoints Value is 20 - 49 autofill this checkbox
    If the TotalPoints Value is 50 - 69 autofill this checkbox
    If the TotalPoints Value is 70+ autofill this checkbox
    Assistance in writing the correct script for this would be greatly appreciated.

    All the checkboxes have separate names. 
    Check box #1 is AssetClass.0 with the export value of 1
    Check box #2 is AssetClass.1 with the export value of 2
    Check box #3 is AssetClass.2 with the export value of 3
    Check box #4 is AssetClass.3 with the export value of 4
    Check box #5 is AssetClass.4 with the export value of 5
    Score and StrategyUse the following calculation to determine your point score and indentify the appropriate strategy listed below.A. Add your points for questions 1 – 2.
    B. Add your points for questions 3 – 12.
    C. Subtract B from A. (Numeric Text Box)  name is TotalPoints
     Points Strategy Asset Class Mix (check boxes as named above)
     0 – 10 Primarily Fixed Income: 80% Fixed Income; 20% Equity
    10 – 19 Balanced Fixed Income-Oriented: 60% Fixed Income; 40% Equity
    20 – 49 Balanced Equity-Oriented: 40% Fixed Income; 60% Equity
    50 – 69 Primarily Equity: 20% Fixed Income; 80% Equity
    70+ Equity: 95%; 5% Cash 

  • Popup Key LOV, NULL and "Invalid numeric value undefined for column"

    Hello.
    I've created an item based on database column of NUMBER type and set the following properties:
    Display As = Popup Key LOV (Displays description, returns key value)
    List of values definition=select 'display_value' d, 1 r from dual
    Null display value=%
    Null return value=
    Display Null=Yes
    When I select "%" in the LOV and try to apply changes to database I get error:
    ORA-20001: Error in DML: p_rowid=1781, p_alt_rowid=N1, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value undefined for column N2
    Error Unable to process row of table TTT.
    If I set Display As = Select List, all works fine. But I need Popup Key LOV.
    Could anybody help me?
    I use Application Express 2.2.1.00.04

    Hi all,
    I did my homework and solved this issue. First I would like to thank Patrick Wolf for the invaluable help he gives out on thread Re: Null value handling in LOVs The code presented here is just a minor edit to his code, but an essential one when dealing with Popup Key LOV items.
    Here's what I did:
    1. Create an Application Process.
    Name: RemoveNulls
    Sequence: 0
    Point: On Submit: After Page Submission - Before Computations and Validations
    Process Text:
    BEGIN
        FOR rItem IN
          ( SELECT ITEM_NAME
              FROM APEX_APPLICATION_PAGE_ITEMS
             WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)
               AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)
               AND LOV_DISPLAY_NULL = 'Yes'
               AND LOV_DEFINITION   IS NOT NULL
               AND LOV_NULL_VALUE   IS NULL
        LOOP
            IF (V(rItem.ITEM_NAME) = '%null' || '%' OR V(rItem.ITEM_NAME) = 'undefined')
            THEN
                Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
            END IF;
        END LOOP;
    END;Error Message: #SQLERRM#Condition: None
    2. You should be able to submit a Popup Key LOV with a NULL value now.
    Once again, THANKS, Patrick! You rock! I'm seriously thinking of trying ApexLib now :)
    Georger

  • Get numerical values from 2D array of string

    Hello! 
    I start by saying that I have a base knowledge of LabView. I'm using LabView 2011. I'm doing some communications test via Can-Bus protocol. As you can see in pictures of the block diagram and of the front panel that I've attached I'm using "Transmit Receive same Port" LabView example. It works very good but I would need to insert the 8 data bytes that I receive from the server in 8 different numerical variables so that I could use them to make some operations. How can I get numerical values from the 2D array of string that I attached? 
    Every example that you can provide is important! 
    Thank you very much! 
    Attachments:
    1.jpg ‏69 KB
    2.jpg ‏149 KB

    Hi martiflix,
    ehm: to unbundle data from a cluster I would use the function Unbundle(ByName)…
    When you are new to LabVIEW you should take all the FREE online resources offered by NI on their website!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • BEx report hangs- selecting Alpha numeric values

    I am working on the existing customer report
    customer is the selection parameter for my report.
    Issue is Customer has numerical and alpha numerical values.
    If i give parameter rangs of value is numerical
    01 - 500 query works fine
    01-50cust1
    50 cust1 - 195 cust2
    query hangs.
    Is their any way we can improve the query performance .
    for searching alphanumerica values.
    I have a workbook is built based on the query.
    morethan 6 queries attached in the sheet 1....sheet2
    each sheet has it is own query with values.
    when I refresh and execute the workbook with the customer alphanumerica values it hangs.
    Query is built based on the multiprovider.
    Please help me onthis

    Hello,
    Try exporting in the 'fully formated grids and text'. It shouldl give you the 'member alias' used in the report.
    Looks like if you export in the 'querry ready grids and text' it will show the 'member name' as in database although the report may have used the 'member alias'.
    Regards

  • XDOFX if-then-else command testing of space and numeric value

    Hi,
    I have the following xdofx statement in a RTF template to display the value of one variable or another, depending on the value it contains: (the variable can contains both space or null or a numeric value).
    <?xdofx: If Amount_1 = " then 'display amount_2' else If Amount_1 = 0 then 'display amount_2' else 'display Amount_1' end if?>
    Result: When Amount_1 variable contains space or null value, then this If-then-else statement works. But When Amount_1 contains a number such as 0, it gives error "SBL-OMS-00203" (when it's checked against [=" ] in If condition). What's causing this? Is XDOFX being confused to test a variable that supposedly a character string (default by testing against [ =" ]), but find a number in the variable?
    Any work around solution? (So [=" ] and [=0 ] can both be specified against a variable in an if-then-else statement in XDOFX).
    Thanks a lot.
    A.

    try
    <?xdofx:if (Amount_1 =’’) then ‘display amount_2’ else if (Amount_1 =’0’) then ‘display amount_2’ else ‘display Amount_1’ end if?>or
    <?xdofx:if (Amount_1 =’’) then ‘display amount_2’ else if (to_number(Amount_1) =0) then ‘display amount_2’ else ‘display Amount_1’ end if?>

  • Creating a sound from an array of numeric values and playing it on speakers

    How do I create take a sound I have stored as an array (or could be an arraylist if needed) of numeric values (at the moment as doubles) whiten my program and output it to speakers? I am using blueJ.
    for example (0, 0.1, 0.4, 0.8, 0.9, 1, 0.8, 0.6, 0.3, 0.1, etc...) would be a very high frequency sin wave.
    Edited by: alan2here on Feb 6, 2008 11:28 AM

    I stumbled upon this thread with a question somewhat related:
    I've recorded a wave file from microphone. But what I would like is an array of numbers in the same way alan said. I'm also working on my own project involving signal processing (i'm trying to do speech recognition).
    I can't really find a nice way of getting that array of numbers. I've tried to find out how wave file stores it's data, and directly read from the File object, but i figured there should be an easier way...
    I used this code to read the sound:
    *     SimpleAudioRecorder.java
    *     This file is part of jsresources.org
    * Copyright (c) 1999 - 2003 by Matthias Pfisterer
    * All rights reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * - Redistributions of source code must retain the above copyright notice,
    *   this list of conditions and the following disclaimer.
    * - Redistributions in binary form must reproduce the above copyright
    *   notice, this list of conditions and the following disclaimer in the
    *   documentation and/or other materials provided with the distribution.
    |<---            this code is formatted to fit into 80 columns             --->|
    import java.io.IOException;
    import java.io.File;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.TargetDataLine;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.LineUnavailableException;
    import javax.sound.sampled.AudioFileFormat;
    public class SimpleAudioRecorder
    extends Thread
         private TargetDataLine          m_line;
         private AudioFileFormat.Type     m_targetType;
         private AudioInputStream     m_audioInputStream;
         private File               m_outputFile;
         public SimpleAudioRecorder(TargetDataLine line,
                             AudioFileFormat.Type targetType,
                             File file)
              m_line = line;
              m_audioInputStream = new AudioInputStream(line);
              m_targetType = targetType;
              m_outputFile = file;
         /** Starts the recording.
             To accomplish this, (i) the line is started and (ii) the
             thread is started.
         public void start()
              /* Starting the TargetDataLine. It tells the line that
                 we now want to read data from it. If this method
                 isn't called, we won't
                 be able to read data from the line at all.
              m_line.start();
              /* Starting the thread. This call results in the
                 method 'run()' (see below) being called. There, the
                 data is actually read from the line.
              super.start();
         /** Stops the recording.
             Note that stopping the thread explicitely is not necessary. Once
             no more data can be read from the TargetDataLine, no more data
             be read from our AudioInputStream. And if there is no more
             data from the AudioInputStream, the method 'AudioSystem.write()'
             (called in 'run()' returns. Returning from 'AudioSystem.write()'
             is followed by returning from 'run()', and thus, the thread
             is terminated automatically.
             It's not a good idea to call this method just 'stop()'
             because stop() is a (deprecated) method of the class 'Thread'.
             And we don't want to override this method.
         public void stopRecording()
              m_line.stop();
              m_line.close();
         /** Main working method.
             You may be surprised that here, just 'AudioSystem.write()' is
             called. But internally, it works like this: AudioSystem.write()
             contains a loop that is trying to read from the passed
             AudioInputStream. Since we have a special AudioInputStream
             that gets its data from a TargetDataLine, reading from the
             AudioInputStream leads to reading from the TargetDataLine. The
             data read this way is then written to the passed File. Before
             writing of audio data starts, a header is written according
             to the desired audio file type. Reading continues untill no
             more data can be read from the AudioInputStream. In our case,
             this happens if no more data can be read from the TargetDataLine.
             This, in turn, happens if the TargetDataLine is stopped or closed
             (which implies stopping). (Also see the comment above.) Then,
             the file is closed and 'AudioSystem.write()' returns.
         public void run()
                   try
                        AudioSystem.write(
                             m_audioInputStream,
                             m_targetType,
                             m_outputFile);
                   catch (IOException e)
                        e.printStackTrace();
         public static void main(String[] args)
              if (args.length != 1 || args[0].equals("-h"))
                   printUsageAndExit();
              /* We have made shure that there is only one command line
                 argument. This is taken as the filename of the soundfile
                 to store to.
              String     strFilename = args[0];
              File     outputFile = new File(strFilename);
              /* For simplicity, the audio data format used for recording
                 is hardcoded here. We use PCM 44.1 kHz, 16 bit signed,
                 stereo.
              AudioFormat     audioFormat = new AudioFormat(
                   AudioFormat.Encoding.PCM_SIGNED,
                   44100.0F, 16, 2, 4, 44100.0F, false);
              /* Now, we are trying to get a TargetDataLine. The
                 TargetDataLine is used later to read audio data from it.
                 If requesting the line was successful, we are opening
                 it (important!).
              DataLine.Info     info = new DataLine.Info(TargetDataLine.class, audioFormat);
              TargetDataLine     targetDataLine = null;
              try
                   targetDataLine = (TargetDataLine) AudioSystem.getLine(info);
                   targetDataLine.open(audioFormat);
              catch (LineUnavailableException e)
                   out("unable to get a recording line");
                   e.printStackTrace();
                   System.exit(1);
              /* Again for simplicity, we've hardcoded the audio file
                 type, too.
              AudioFileFormat.Type     targetType = AudioFileFormat.Type.WAVE;
              /* Now, we are creating an SimpleAudioRecorder object. It
                 contains the logic of starting and stopping the
                 recording, reading audio data from the TargetDataLine
                 and writing the data to a file.
              SimpleAudioRecorder     recorder = new SimpleAudioRecorder(
                   targetDataLine,
                   targetType,
                   outputFile);
              /* We are waiting for the user to press ENTER to
                 start the recording. (You might find it
                 inconvenient if recording starts immediately.)
              out("Press ENTER to start the recording.");
              try
                   System.in.read();
              catch (IOException e)
                   e.printStackTrace();
              /* Here, the recording is actually started.
              recorder.start();
              out("Recording...");
              /* And now, we are waiting again for the user to press ENTER,
                 this time to signal that the recording should be stopped.
              out("Press ENTER to stop the recording.");
              try
                   System.in.read();
              catch (IOException e)
                   e.printStackTrace();
              /* Here, the recording is actually stopped.
              recorder.stopRecording();
              out("Recording stopped.");
         private static void printUsageAndExit()
              out("SimpleAudioRecorder: usage:");
              out("\tjava SimpleAudioRecorder -h");
              out("\tjava SimpleAudioRecorder <audiofile>");
              System.exit(0);
         private static void out(String strMessage)
              System.out.println(strMessage);
    }Daniel

  • How do I get my XML numeric values to show up when loaded into flash?

    Hi there,
    I've created an AS2 3D carousel  It loads text values in the "content" section of the code below -  including numbers and special characters into the .swf but...
    What I can't figure out, is how to get it so that the "Tooltip" loads the text into the movieclip, but can also have numeric and special characters in it.
    For example, I need the title of one of the icons on this carousel to be "3D Images," but only the "D Images" shows up from the XML text for the tooltip.  The content when a user clicks on the icon can include numbers, just not the titles for some reason.
    http://iongeo.com/collaboration_test_dev/video_arctic_imaging.html
    I think it has something to do with the way that my text is loaded from the xml document specifically for the tooltip and tipText for the movie clip.  Can numeric values be loaded into a movie clip in AS2?  PLEASE HELP!
    import mx.utils.Delegate;
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    var numOfItems:Number;
    var radiusX:Number = 300;
    var radiusY:Number = 75;
    var centerX:Number = Stage.width / 2;
    var centerY:Number = Stage.height / 2;
    var speed:Number = 0.05;
    var perspective:Number = 130;
    var home:MovieClip = this;
    theText._alpha = 0;
    theHeader._alpha = 0;
    var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
    tooltip._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = function()
        var nodes = this.firstChild.childNodes;
        numOfItems = nodes.length;
        for(var i=0;i<numOfItems;i++)
            var t = home.attachMovie("item","item"+i,i+1);
            t.angle = i * ((Math.PI*2)/numOfItems);
            t.onEnterFrame = mover;
            t.toolText = nodes[i].attributes.tooltip;
            t.content = nodes[i].attributes.content;
            t.header = nodes[i].attributes.header;
            t.icon.inner.loadMovie(nodes[i].attributes.image);
            t.r.inner.loadMovie(nodes[i].attributes.image);
            t.icon.onRollOver = over;
            t.icon.onRollOut = out;
            t.icon.onRelease = released;
    function over()
        //BONUS Section
        home.tooltip.tipText.text = this._parent.toolText;
        home.tooltip._x = this._parent._x;
        home.tooltip._y = this._parent._y - this._parent._height/2;
        home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
        home.tooltip._alpha = 100;
    function out()
        delete home.tooltip.onEnterFrame;
        home.tooltip._alpha = 0;
    function released()
        //BONUS Section
        home.tooltip._alpha = 100;
        for(var i=0;i<numOfItems;i++)
            var t:MovieClip = home["item"+i];
            t.xPos = t._x;
            t.yPos = t._y;
            t.theScale = t._xscale;
            delete t.icon.onRollOver;
            delete t.icon.onRollOut;
            delete t.icon.onRelease;
            delete t.onEnterFrame;
            if(t != this._parent)
                var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,0,1,true);
                var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,0,1,true);
                var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,100,0,1,true);
            else
                var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,t._xscale,100,1,true);
                var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,t._yscale,100,1,true);
                var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,150,1,true);
                var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,250,1,true);
                var tw5:Tween = new Tween(theText,"_alpha",Strong.easeOut,0,100,1,true);
                var tw5:Tween = new Tween(theHeader,"_alpha",Strong.easeOut,0,100,1,true);
                theText.text = t.content;
                theHeader.header = t.header;
                var s:Object = this;
                tw.onMotionStopped = function()
                    s.onRelease = unReleased;
    function unReleased()
        //BONUS Section
        var sou:Sound = new Sound();
        sou.attachSound("sdown");
        sou.start();
        delete this.onRelease;
        var tw:Tween = new Tween(theText,"_alpha",Strong.easeOut,100,0,0.5,true);
        var tw:Tween = new Tween(theHeader,"_alpha",Strong.easeOut,100,0,0.5,true);
        for(var i=0;i<numOfItems;i++)
            var t:MovieClip = home["item"+i];
            if(t != this._parent)
                var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,0,t.theScale,1,true);
                var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,0,t.theScale,1,true);
                var tw3:Tween = new Tween(t,"_alpha",Strong.easeOut,0,100,1,true);
            else
                var tw:Tween = new Tween(t,"_xscale",Strong.easeOut,100,t.theScale,1,true);
                var tw2:Tween = new Tween(t,"_yscale",Strong.easeOut,100,t.theScale,1,true);
                var tw3:Tween = new Tween(t,"_x",Strong.easeOut,t._x,t.xPos,1,true);
                var tw4:Tween = new Tween(t,"_y",Strong.easeOut,t._y,t.yPos,1,true);
                tw.onMotionStopped = function()
                    for(var i=0;i<numOfItems;i++)
                        var t:MovieClip = home["item"+i];
                        t.icon.onRollOver = Delegate.create(t.icon,over);
                        t.icon.onRollOut = Delegate.create(t.icon,out);
                        t.icon.onRelease = Delegate.create(t.icon,released);
                        t.onEnterFrame = mover;
    function moveTip()
        home.tooltip._x = this._parent._x;
        home.tooltip._y = this._parent._y - this._parent._height/2;
    xml.load("icons.xml");
    function mover()
        this._x = Math.cos(this.angle) * radiusX + centerX;
        this._y = Math.sin(this.angle) * radiusY + centerY;
        var s = (this._y - perspective) /(centerY+radiusY-perspective);
        this._xscale = this._yscale = s*100;
        this.angle += this._parent.speed;
        this.swapDepths(Math.round(this._xscale) + 100);
    this.onMouseMove = function()
        speed = (this._xmouse-centerX)/8000;

    Kglad, you are my HERO!
    Thanks so much for your reply, I did not know about the embed options within flash...
    Mike

  • How to represent a -1 numeric value with text?

    Hi All,
    Question: How do I get the value of negative one (-1) in a numeric column to display as "all"?
    Background: For our lottery players, they are able to opt in to various automated alerts.  One column is an integer value representing one of five different thresholds for sending an alert: 10,000, 50,000, 100,000, 500,000, and -1.  The -1 value
    actually represents all of the other 4 values, or simply "all thresholds," meaning "send me an alert at every one of these thresholds."
    What is the best way to represent the -1 value in the cube?  A user won't understand that -1 is equivalent to "all choices".  I could change the view so that the column is a string instead of an integer, but I assume this is going to
    affect the cube in a negative way, such as unexpected sorting, etc.
    I asked our resident SSAS guy if a numeric value could be displayed (not read) as "all values" while actually storing the -1 value, but all he could suggest was changing the data type and using a case statement to replace -1 with "all values." 
    This does not seem like a fix to me.
    Is there a way to make SSAS display a negative one value as "all choices" without changing the data type of the source column itself?
    Thanks,
    Eric B 

    Normally you would have a lookup on the number and a text value for the result displayed to users in the cube.
    KeyValue
    DisplayValue
    10000
    $10,000
    50000
    $50,000
    100000
    $100,000
    500000
    $500,000
    -1
    All Values

Maybe you are looking for

  • No authorization for this transaction with movement type 601

    Dear All, This is chandra i am getting this error in delivery level " No authorization for this transaction with movement type 601. If give the authorization for SAP ALL its working fine. If give the authorization for SAP SD T.Codes i am getting this

  • How can I add a new certificate to be used with SFTP

    Hi, I wanted to know how to add a new certificate (from MS server) so it can be used by sftp. I tried certtool, but got error messages. It's a DSA cert, and I need to secure ftp to this site. Thanks in advance

  • Can I use my MAC (G5 & OS 10.4) to send SMS from the UK?

    (The third of my first set of postings!) When I used an earlier PowerMac and OS 9, I was able to dial a Vodafone number (using the communications module of Claris Works) to send SMS messages to mobile phones. I have recently seen Widgets advertised w

  • I hate the combined search and address fields

    Dear Apple,       I am very disappointed with the newly combined address and search field. Not only does it not work as well but it's lost important functionality as well. In particular: The snap back feature of the search field was brilliant. It was

  • No servers configured for repository?

    Hi, I just recently reinstalled arch, and I don't even have a DE or WM installed yet. I was just trying to install wicd to get my wifi to work, when I got this: :: Retrieving packages from core... warning; failed to retrieve some files from core erro