A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Input/Dynamic Text Question

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    21

    Input/Dynamic Text Question

    Greetings!

    I'm having a bit of a problem and can't figure out what I'm doing wrong. Here's my setup:

    Frame 1 has an input field with an instancename of "studentName"

    Frame 2 has a dynamic text field with an instancename of "name"

    I am trying to get the dynamic text field to display what is entered into the input field on frame 1.

    Here is the script I'm using on the "submit" button that is below the input field on frame 1:

    on (release) {
    gotoAndStop(2);
    name.text = studentName;
    }

    Am I completely off base or am just missing something simple?

    Thanks for any help you can provide!

    - - Nursedad

  2. #2
    ReMember jennyj's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    549
    on your submit button, just have
    on (release) {
    gotoAndStop(2);
    }

    then give your input box the variable "studentName"
    on the second frame, give your dynamic box the variable "name", and put this code on the frame

    stop();
    name = studentname;


    I have included a very basic fla to help you
    Attached Files Attached Files

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    the 2 textfields don't exist at the same time, so on the button in frame 1 flash has no idea what name is. you could do this by assigning a temporary variable.

    on (press) {
    var temp = studentName.text;
    gotoAndStop(2);
    }

    then in frame 2

    name.text = temp;

  4. #4
    Junior Member
    Join Date
    Jun 2002
    Posts
    21
    Thanks so much to both of you for your input!!

    I tried both methods (for the purposes of my education) and each...of course worked.



    - -Nursedad

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center