Flash Gallery | Flash Templates | Flash Menu | Flash Design | Flash Audio & Video

flash page flip

Actionscript 3.0 video tutorials

+ Reply to Thread
Results 1 to 3 of 3

Thread: How to extract the text from a Input textfield ???

  1. #1
    Junior Member Settled In Reddoor is on a distinguished road
    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0

    How to extract the text from a Input textfield ???

    flash templates
    Hi I'm trying to extract the text, which is entered into an input textfield and emailed via PHP. I know how to get it using the instance name method when a input box is created by drawing it on the stage. My problem is that I have created the input textfield via ActionScript 3.0 within a Document Class and I don't know how to access the text property.

    Here's how I created the textfield, which works fine

    var nameInput:TextField = createTextField(200, 250, 250, 25);
    nameInput.type = TextFieldType.INPUT;
    nameInput.text = "Full Name (First, Last)";
    nameInput.setTextFormat(efFormat);

    But when I try just to trace it

    trace("name: " + nameInput.text);

    I get this error meassage

    "TypeError: Error #1009: Cannot access a property or method of a null object reference."

    Can anyone help me on this? I just need the proper name/way to access the text within the input textfield.

    Thanks!

  2. #2
    Administrator Living At The FlepStudio! Flep is on a distinguished road
    Join Date
    Jul 2007
    Posts
    5,609
    Rep Power
    9

    Re: How to extract the text from a Input textfield ???

    Hi,
    paste here all the DC code please.

  3. #3
    Junior Member Settled In Reddoor is on a distinguished road
    Join Date
    Nov 2008
    Posts
    4
    Rep Power
    0

    Re: How to extract the text from a Input textfield ???

    Thanks for your reply Flep but I figured it out. I had to create the input textfeild with out calling the createTextField() function. I just took the code from the createTextField() function and hardcoded it into the setUp() function.

    Thanks again for your reply. Great site!

+ Reply to Thread

Similar Threads

  1. Input Text and Button
    By Nickhouse in forum Flash Italiano
    Replies: 0
    Last Post: 03-02-10, 10:21
  2. Working with input text
    By ramin_85 in forum Actionscript 3.0 newbies
    Replies: 0
    Last Post: 20-04-09, 04:20
  3. Problema Text Input... Aiuto!
    By lurex89 in forum Actionscript 3.0 base
    Replies: 1
    Last Post: 09-03-09, 11:42
  4. Input Text Field Question
    By pinkb0xes in forum Flash English
    Replies: 7
    Last Post: 04-03-09, 17:28
  5. Papervision e input text
    By enricoB in forum Actionscript 3.0 avanzato
    Replies: 0
    Last Post: 01-09-08, 03:52

Bookmarks

Posting Permissions

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