dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Passing input text values to child clips

Hybrid View

  1. #1
    Member
    Join Date
    Jul 2005
    Posts
    63

    Passing input text values to child clips

    I am making a certificate that I want the end user to be able to type in his or her name onto a sheet that will print later. I've tried a variety of methods to pass the input text to a child clip (the one that is being used for printing). I can normally get the input text box on the parent level to return a value, but when I try to pass it along to the child clip, I normally wind up with "undefined". I've tried passing the value to a string via:

    firstNameInput.text = firstName;

    with ActionScript in the child frame that I was expecting to use the variable, with no result. after looking through these forums, I found this code:

    firstNameInput.onChanged = function () {
    firstNameInput.text = trainingCert_mc.firstNameResult.text;
    }

    which has given me the same result. can anyone tell me where i'm going wrong?
    Attached Files Attached Files

  2. #2
    Member
    Join Date
    Jul 2005
    Posts
    63
    I managed to fix the problem. what i did was put the code into the main clip, and just referred to the text box in the child clip.

    submitButton_btn.onRelease = function () {
    childClip_mc.text = parentClipInputTextBox.text;
    }

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