input text question

Posted on 2005-04-08
Last Modified: 2010-04-03
Hi, Experts
If I use on screen buttons ( which I created ) to input some text in an input textfield ( var name Name ), I wonder how to keep the same text show on this text field after change timeframe. For example, I have two layers, one is all the buttons and textfield. Top layer is scripting. There are 10 time frames. I input name on time frame 1 and click on a button ( confirmation button instance name enter_btn ) and jump to time frame 5 with a pop up window ( instance name image7 ) confirm the input, then click an ok button on this pop window which lead to time frame 10. How to keep the input text until to the time frame 10 ? because it is gone after I click ok on the pop up window. Also, on this pop up window, I want to show the input text on it , how to write the script ( I guess I should put a dynamic text field on this pop up window to show the text I input at time frame 1) . thanks

-------Input text buttons script -------

Name = "";

function addText(character){   <-- add text to text field ( var is Name )
      Name = Name+character;
a.onPress = function(){  <--- button A
b.onPress = function(){  <--- button B
...........until Z
Question by:mingchih
    LVL 27

    Accepted Solution

    1. area you using flash mx or flash mx 2004?
    2. I'm not sure I clearly understand your question, especially in relation with your script..

    Author Comment

    sorry, need to re work on the question....
    LVL 27

    Expert Comment

    Well, I didn't solved your question, untill then those points are yours.. :)
    (If you are not going on, you should ask for points refund)

    Author Comment

    ok...i think I will only need to ask.....I type text into input text field at frame 1. Click on a confirm button and go to frame 2. at frame 2, there is a movie clip instance name pop_up_win. I wonder how to show the same text I type at frame 1 in this movie clip at frame 2 ? I am using Flash MX 2004
    LVL 27

    Expert Comment

    If "Name" is the variable associated to the input textfield (not the instance name), then it's not lost when moving to frame 2, it's still there. When you are on frame 2, use a script like this to move your variable to the textfield inside the movieclip

    // actions snippet for frame 2
    movieclip_instance_name.innerTextFieldvariable = Name;

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
    Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
    The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
    The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now