Help changing text in a textfield

Hello, I am trying to create buttons that will replace the text in a text field. 
The text field is "Staff_Copy"
The buttons are "Staff_Saam_btn", "Staff_Nicolas_btn", "Staff_David_btn", and "Staff_Anthony_btn".
//Code in frame 1 of timeline
var Staff_Copy_Value:Number = 0;
var Saam_Copy:String = "This is the text for Saam's Bio";
var Nicolas_Copy:String = "This is the text for Nick's Bio";
var Anthony_Copy:String = "This is the text for Anthony's Bio";
var David_Copy:String = "This is the text for David's Bio";
//code in frame in which textfield first appears on stage
Staff_Saam_btn.onPress = function()    {
                Staff_Copy_Value = 4;
Staff_Nicolas_btn.onPress = function() {
                Staff_Copy_Value = 3;
Staff_David_btn.onPress = function()    {
                Staff_Copy_Value = 2;
Staff_Anthony_btn.onPress = function()              {
                Staff_Copy_Value = 1;
_root.onEnterFrame = function()             {
                if (Staff_Copy_Value == 4)          {
                                Staff_Copy.text = Saam_Copy;
                } else if (Staff_Copy_Value == 3)              {
                                Staff_Copy.text = Nicolas_Copy;
                } else if (Staff_Copy_Value == 2)              {
                                Staff_Copy.text = David_Copy;
                } else if (Staff_Copy_Value == 1)              {
                                Staff_Copy.text = Anthony_Copy;
This doesn't work.  Whatever the initial value of the variable "Staff_Copy_Value" is will determine the text in the field.  So if I use the value 0 as in the above, whatever is in the textfield on the stage shows.  If I use 1,2,3, or 4 then the text strings in the defined variables shows up.  What am I missing.  I am assuming it is has to do with the onEnterFrame command.  How do I make the movie keep checking the value of "Staff_Copy_Value"?
Thanks!

Hi,
try this:
//frame 1 of timeline
var pressing:Boolean = false;
var movement:Number = 0;
var Staff_Copy_Value:Number = 3;
//the text in the following strings are condensed.  The actual text takes
//more space than the text box will show.  Hence the need for scroll
//buttons.
var Saam_Copy:String = "This is the text for Saam's Bio";
var Nicolas_Copy:String = "This is the text for Nick's Bio";
var Anthony_Copy:String = "Condensed text for Anthony's Bio.";
var David_Copy:String = "This is the text for David's Bio";
//frame in which the textfield enters stage (25).
upButton_btn.onPress = function() {
    _root.pressing = true;
    _root.movement = -1;
upButton_btn.onRelease = function() {
     _root.pressing = false;
downButton_btn.onPress = function() {
     _root.pressing = true;
    _root.movement = 1;
downButton_btn.onRelease = function() {
     _root.pressing = false;
Staff_Saam_btn.onPress = function() {
     _root.Staff_Copy_Value = 4;
Staff_Nicolas_btn.onPress = function() {
     _root.Staff_Copy_Value = 3;
Staff_David_btn.onPress = function() {
     _root.Staff_Copy_Value = 2;
Staff_Anthony_btn.onPress = function() {
     _root.Staff_Copy_Value = 1;
_root.onEnterFrame = function() {
    if (Staff_Copy_Value == 4) {
         Staff_Copy.text = Saam_Copy;
    } else if (Staff_Copy_Value == 3) {
         Staff_Copy.text = Nicolas_Copy;
    } else if (Staff_Copy_Value == 2) {
        Staff_Copy.text = David_Copy;
    } else if (Staff_Copy_Value == 1) {
         Staff_Copy.text = Anthony_Copy;
    if (_root.pressing == true) {
          _root.Staff_Copy.scroll = _root.Staff_Copy.scroll + _root.movement;
Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com/

Similar Messages

  • Help changing text fields background

    Hello, I need help changing the field text background color. In some forms I use read only field texts, and I would like those ones to have a different color (like gray) so it is easy to see they are read only..
    How can I do that??
    Thanks for your help!!

    Nobody knows how to do it?

  • Hi. I need help changing text in browser tab.

    Greetings,
    I have downloaded a template and have uploaded it successfully. However, the text in browser tabs still say "Temple Free blah blah".
    I'd like it to say my website title.
    Could someone please walk me through this elementry task?
    Best,
    Chadrick

    Here is the simplest way to manage your Page Names:

  • How do I change Text Colour in a Spreadsheet?  The Help menu doesn't help.

    Simple question whcih i cannot find the simple answer to:  How do I change Text Colour in a Spreadsheet?  The Help menu doesn't help.

    Hi Lecia,
    You have several choices.
    Use the first set of controls in the Format Bar. One of these is a Color well (red in the image). Select the cell(s) in which you want the text coloured, then click the well to open its Color palette, and choose your colour.
    Use the Text Inspector. Open the inspector, click the Text button (T), and use the tools there (similar to the set in the Format Bar).
    Press command-T to open the Fonts Window. This offers a few more options than are available in the Inspector or the Format bar.
    Regarding "Help": I'd recommend using the Numbers '09 User Guide, which you can download via the Help menu. Easier to search, and easier reading than the individual Help articles. search 'text color' to quickly get to instructions on applying colour to text.
    Regards,
    Barry

  • Can't change text once I've finalized it!

    I've been using Photoshop for years, so I know all the basics.  And I've never run into this before.  I created a document with text boxes and images.  Everything was fine to that point.  But when I went back to re-word the text boxes and change text color, I could not do it.  I tried everything:  be sure that layer is selected, be sure I have the type tool enabled, and click somewhere in the existing text.
    Nothing doing.  No matter what I did, it insisted on starting a new text layer.  I could not access the text itself to change it.
    I could transform it or move it but it will not let me change the text itself or the text color.
    I'm using the PS cloud version and running Windows 7.
    I ran into this a few weeks ago, and rebooting my computer solved the problem -- or so I thought.  Apparently it didn't solve it permanently.
    Help, please!  This was due yesterday and my client is understandably not amused.
    Thanks.

    Now I can change text in any text box except the one titled "spinetext", which is highlighted in the layers panel.  Obviously I'm doing something wrong, but I've designed a lot of these covers, and never had trouble changing the spine text before.
    I finally had to recreate that layer in a new document and import it into this one -- but the text remains unchangeable in this layer.
    (For what it's worth, "Layer 1" is the template, which I turn off when I have inserted all the elements, so it has nothing to do with this layer.)
    Thanks for your help!

  • How to change text in PDF doc. which is a musical score

    Hello,
    I'm new here, so please excuse me if I do or say something I shouldn't.
    I need to change the words in a musical score because the font is too small. OCR recognition doesn"t work because there are illustrations that are different from images or text... Is there a way to get in there and make the changes I need to do?
    Any help greatly appreciated.

    Thanks for the reply, but I have Adobe Reader 9 Pro. Will it still not 
    work ?
    Le 29 sept. 2011 à 29 sept. 11 - 16:09, Claudio González a écrit :
    Re: How to change text in PDF doc. which is a musical score
    created by Claudio González in Adobe Reader - View the full discussion
    Unfortunately, not with the free Reader.
    Replies to this message go to everyone subscribed to this thread, 
    not directly to the person who posted the message. To post a reply, 
    either reply to this email or visit the message page: [http://forums.adobe.com/message/3944833#3944833
    To unsubscribe from this thread, please visit the message page at [http://forums.adobe.com/message/3944833#3944833
    ]. In the Actions box on the right, click the Stop Email 
    Notifications link.
    Start a new discussion in Adobe Reader by email or at Adobe Forums
    For more information about maintaining your forum email 
    notifications please go to http://forums.adobe.com/message/2936746#2936746

  • How do I change text size in a check box in CS3

    How do I change text size in a check box in CS3?

    While I've never done it myself for a checkbox, components
    have a textField property which is essentially the texfield inside
    the component. You probably need to apply a TextFormat to it to
    change the size.
    But if this involves the same problem you had yesterday,
    where you couldn't change the width of the checkbox, I doubt you'll
    have much luck changing the text size

  • Easy one I hope: How do I change text color?

    For the life of me I can't seem to find anything with a color pallette (except for background fill). I need to change text color but don't know where to find it.  Everything's always black. When I highlight the text, and goto "Font", I see something that looks like the "Select Text Color" (like the one above but as soon as you mouse over it, it turns to a crossed-out "ABC", and can't get the pallette.
    Thanks for your help.

    Hi,
    Question: Are these fields that you had changed the type of in the Object Pallet/Field Tab/Type ? If so, try deleting the object and put a new one in its place from the Object Library.
    If no, what sort of parent do these items have? Table Row? or SubForm?
    Good luck!
    Stephen

  • Using external XML document to update / change text fields inside of published captivate output.

    Hello
    I currently have a project where the client has requested to have the ability to update the text fields inside the project at a later date.
    This is due to the nature of the content changing rather rapidly, i would like to set this up so the client can manage this them selfs.
    What would the best way to do this be?
    I'm thinking XML, an external XML sheet were by Captivate imports the text from this XML sheet and then displays it within the specific text fields contained within the captivate output.
    This way the client would just update the external XML document(cut and paste the text in) and then the text would be dynamically updated in the published Captivate document.
    any help would be amazing !
    Thanks in advance
    Nick

    Hi Lieve
    But isn't this thread more about an end user having an ability to change text after the Captivate has been published and delivered? I could see where that might be useful if making changes then publishing to create a new output. But I'm interpreting that the situation here is that a Captivate project has been published and delivered, and some mechanism is desired that allows the recipient to modify an external XML file to influence changes in the already compiled Captivate output.
    Cheers... Rick

  • How to change Text to Number in Excel 2013

    Hi,
    I imported and parsed a large CSV file (75000 rows) with 4 columns as numbers. They arrive in Excel as text with a "." as decimal separator. In Excel options, I set the decimal separator to "." but data remains as text. I could edit and
    enter each cell to convert it as number but I have 4 x 75000 cells...
    Any idea ?
    Thanks for your help

    Hey Wlid1966,
    This simple action, I've included some links that explain you step by step:
    http://www.extendoffice.com/documents/excel/582-excel-change-text-to-number.html
    http://www.extendoffice.com/documents/excel/671-excel-change-number-to-text.html
    http://www.accountingweb.com/article/three-ways-convert-text-based-numbers-values/222008
    Please Mark This As Answer if it helps to solve the issue
    Tzuri Ben Ezra | My Certifications:
    CompTIA A+ ,Microsoft MCP, MCTS, MCSA, MCITP
    |
    FaceBook: Tzuri FaceBook | vCard:
    Tzuri vCard | 
    Microsoft ID:
    Microsoft Transcript 
     |

  • Please help. Text fields launch email for XML data

    Let me start by saying I have only been using LiveCycle for two days. I did buy a book and have exhaustuvley searched for a solution....with that said....
    After completing almost the entire form, somehow or other I managed to make all the text fields but one initiate email of xml data as soon as you try to type in them in PDF preview or reader or pro.
    I added a new text field for test and it does NOT do the same thing. I can't for the life of me figure out how to turn this off.
    Issue:
    When checking pdf preview, if I click inside a text field to type, it stops the preview and launches an email window with a blank XML file. It does the same thing if I open the file in Reader or Pro.
    Solution I am looking for:
    My form is nearly complete and i would hate to have to start all over. Basically, I do NOT want the text fields to initiate an email of the form data. I just want the user to be able to type in them as required. In my opinion this should only happen with the "email form" button.
    Thanks,
    Joe
    [email protected]

    funny, i found a workaround. after nearly 3 hours and finally posting here, in 15 minutes i found something. I still would like to know
    what caused this if anyone knows.....
    Fix:
    By selecting the text field and changing object type to "Text" then changing it back to "TextField" then save, it now works fine. Of course I had to do it on all 25 fields but way better than redoing all the custom fields i created.

  • How do I change text attributes within one text box in Motion 3?

    I am trying to change text attributes within one text box in Motion 3, but am only able to change the font/size for the entire box. Is there a way to change the attributes to individual lines of text within a text box without creating an entirely new one or using the "Lower Third" text effect?
    How do I create (two different) multiple colors, fonts, bold, italic, underline in one text box within Final Cut Studio Motion (FCP, FCS)

    Thank you! You saved me hours of tinkering around with multiple text boxes. It seemed like it should be something pretty elementary. It didn't help that I am not familiar with proper terminology, so thank you for defining glyph.
    Cheers,
    Owfownugi

  • Access of the Text in the TextField

    In the following code ,how can I access text in the textfield(i.e object x in the following code) in the place of z in the following code:
    BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(z)));
    import java.awt.Color;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.JTextArea;
    public class TextAreaTest1
    public static void main(String[] args)
    TextAreaFrame frame = new TextAreaFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);
    A frame with a text area and buttons for text editing
    class TextAreaFrame extends JFrame implements ActionListener
    public String TextAreaFrame()
    setTitle("TextAreaTest");
    setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
    Container contentPane=getContentPane();
    contentPane.setLayout(new GridLayout(5,5,0,0));
    buttonPanel = new JPanel();
    JPanel textField=new JPanel();
    buttonPanel.add(new JLabel("enter"));
    // add button to append text into the text area
    JTextField x=new JTextField(20);
    JButton insertButton = new JButton("Insert");
    textField.add(new JLabel("Enter the path"));
    // textArea = new JTextArea(8, 30);
    // contentPane.add(insertButton);
    buttonPanel.add(insertButton);
    textField.add(x);
    String z=x.getText();
    insertButton.addActionListener(this);
    contentPane.add(textField);
    JPanel group=new JPanel();
              final JTextField a=new JTextField(18);
              JRadioButton b1=new JRadioButton("Start");
              group.add(b1);
              group.add(new JLabel("to"));
              group.add(a);
              JRadioButton b2=new JRadioButton("End");
              group.add(new JLabel("to"));
              group.add(b2,new JLabel("to"));
    add(group, BorderLayout.SOUTH);
    contentPane.add(buttonPanel);
    textArea = new JTextArea(8, 30);
    scrollPane = new JScrollPane(textArea);
    add(scrollPane);
    return(z);
    public String getField(){ return x.getTest();}
    public void actionPerformed(ActionEvent event)
         try
         BufferedReader br=new BufferedReader(new InputStreamReader(new FileInputStream(z)));
         String l;
                                  // String text = a.getText();
    System.out.println(+textArea.getLineCount());
         while((l=br.readLine())!=null)
    if(l.indexOf("error")==-1)
    textArea.append(l+"\n");
    textArea.setFont(new Font("Dialog", Font.BOLD, 12));
    textArea.setForeground(Color.blue);
    System.out.println("this");
    /*StringTokenizer st=new StringTokenizer(l);
         //String a="error";
    String[] b=new String[10];
         while(st.hasMoreTokens())
                                                           //if(!st.equals("error"))
    int i=0;
                                  String key=st.nextToken();
                                                           b=key;
                                                           {if(b[i].equals("error"))
                                                           textArea.setFont(new Font("Dialog", Font.BOLD, 12));
                                                           textArea.append(b[i]+"\n");
    System.out.println("this");
                                                           i++;}
                                                           else
                                                                     textArea.setFont(new Font("Serif", Font.PLAIN, 12));
                                                                     textArea.append(b[i]+"\n");
    System.out.println("that");
                                                           i++;
                                                           //if(!key.equals("error"))
    //textArea.append(key+"\n");
                                                           //String val=st.nextToken();
                                                           //textArea.setFont(new Font("Dialog", Font.BOLD, 12));
                                                           //textArea.append(ky+"\n");
                                                           //Font f=new Font("Serif",Font.BOLD,40);
                             //textArea.setColor(new JColorChooser());
         //textArea.append(val+"\n");
                                            if(l.indexOf("error")!=-1)
                                                 textArea.setFont(new Font("Serif", Font.PLAIN, 12));
                                                 //textArea.setColor(Color.black);
                                                 textArea.setForeground(Color.red);
                                                 textArea.append(l);
                                       System.out.println("that");
                        catch(Exception ex)
    public static final int DEFAULT_WIDTH = 400;
    public static final int DEFAULT_HEIGHT = 400;
    private JTextArea textArea;
    private JScrollPane scrollPane;
    private JPanel buttonPanel;
    private JButton wrapButton;

    1) Swing related questions should be posted in the Swing forum.
    2) Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.
    3) Use a more descriptive variable name. "x" means nothing.
    4) Define the text field reference name as a class variable, not a local variable.

  • Retrieving the Change Texts per Line Item (Purchase Order) - Very urgent

    Hi,
    How do you retrieve the Change Texts per Line Item (Purchase Order).
    Table T166T does not list these values per line item.
    Please help. This is very urgent & important.
    Best Regards,
    John

    if you are lookin out for change of item texts ...
    then use the function module ... READ_TEXT.
    and 2 tables r used ... STXH and TLINE ....
    double click on item data ...
    goto PO TEXT tab ....
    double click on text ...
    from menu ...
    goto header ... u'll get 4 fields that u need to consider ...
    TDID
    TDOBJECT
    TDHEAD
    TDNAME
    ALL THESE U'LL FIND IN  STXH
    ITEM TEXT is stored in TLINE
    Edited by: anjali rana on Mar 5, 2008 4:55 AM

  • Documaker : how to change text by count during overflow

    Hi Experts,
    Please help me...
    I want to change a text in a section by overflow count.
    Summary that I have set are as follows.
    1. FormA (contains Subform1)
    2. Subform1 (contains Subform2)
    3. Subform2
    Subform1 on FormA is setting the overflow with the trigger by the XML.
    Search Mask (counter) : !/xxx/data/Repeats/Repeat
    Subform2 on Subform1 is setting that always repeat 3 times.
    Reference :
    Documaker : How to set the overflow repeated 3 times always.
    I created DAL scripts as follows.
    1) To setgvm CTR.
    ---> Section_HEADER on Subform1 has a field that setting this script.
    2) To return GVM(CTR).
    ---> Section_TEXT on Subform2 has a field that setting this script.
    3) To increment GVM(CTR) by 1.
    ---> Section_TEXT on Subform2 has a field that setting this script.
    This counter has been running without any problems.
    I tried to set as follows.
    4) To change text by GVM(CTR)-1.
    if havegvm('ctr',1)
    varctr = gvm('ctr',1)
    if varctr-1 = 1
    return("A")
    else if varctr-1 = 2
    return("B")
    else
    return("C")
    end
    else
    return("")
    end
    ---> I placed a field (call this "OUTPUT_TEXT") that is set this script in Section_TEXT on Subform2.
    This setting is working.
    BUT, I want to output the Double-byte characters at OUTPUT_TEXT field.
    I can not input the Double-byte characters in DAL Script. (If I input, DMStudio was shut down...)
    By placing 3 text areas in Section_TEXT, I thought of setting the trigger switch by count of overflow, but I could not set.
    By count of overflow, is there any other ways to solve this problem?
    Thanks,

    Sorry, I resolved this...
    I created 3 triggers and set it for 3 text area.
    A trigger is as follows for *1* text area.
    if havegvm('ctr',1)
    varctr = gvm('ctr',1)
    if varctr = *1*
    return(1)
    end
    else
    return(1)
    end
    return(0)
    And, I moved the increasing count field to most right position in Section_TEXT.
    +3) To increment GVM(CTR) by 1.+
    ---> Section_TEXT on Subform2 has a field that setting this script.
    It is able to switch text areas by count.
    Thanks,

Maybe you are looking for

  • Business Catalyst

    Hi, I've been a partner with Business Catalyst for a number of years now and have numerous sites with them. As part of the Creative Cloud membership it says I can have 5 sites. I currently pay for all my sites with BC so I guess my question is: Will

  • Problem while calling a Webservice from a Stand alone java program

    Hello Everyone, I am using a java program to call a webservice as follows. For this I have generated the client proxy definition for Stand alone proxy using NWDS. Now when I call the method of the webservice I am getting the correct result but along

  • Unable to install LV Runtime Engine 7.1.1 with LabVIEW Professional 8.5.1

    I installed LabVIEW Professional Sys. for Windows (XP) 8.5 and then the 8.5.1 update. Somewhere in the original installation, LV Run-time Engine 7.1 was installed. But I need LV RTE 7.1.1. So I attempted to install RTE 7.1.1. Problem: The LV RTE inst

  • Master Socket - Modem - Hub/Router cabling

    BT sales (and I tried to get through to their technical support) have unfortunately not been able to answer the question. Due to the layout I will need to lay the data extension cable from master socket to modem up the wall and under the floorboards

  • Unable to flip horizontal wordart into Word 2010?

    In Word 2003 whilst using wordart I could easily take some text and then flip it horizontally via the drawing tool bar -> draw -> Rotate or Flip -> Flip Horizontal. If I try the same method in Word 2010 and then select the wordart object -> Drawing T