Welcome to TalkGraphics.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Location
    North Canton, Ohio
    Posts
    12

    Default

    I am stuck... what I need to do is make an input text form field that is required to have the user input an email address before moving on to the next scene... is there a way to accomplish this using actionscript?

    Creative Minds Distort Reality TM
    IP

  2. #2
    Join Date
    May 2002
    Location
    North Canton, Ohio
    Posts
    12

    Default

    I am stuck... what I need to do is make an input text form field that is required to have the user input an email address before moving on to the next scene... is there a way to accomplish this using actionscript?

    Creative Minds Distort Reality TM
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    just validate the input field (we'll call it "myFieldText") using something like:
    <pre class="ip-ubbcode-code-pre">
    if ((myFieldText.indexOf("@") > 1) && (myFieldText.indexOf(".") > (myFieldText.indexOf("@") + 1)) {
    // go to the next scene
    } else {
    // stay on this scene and give them an error message
    }
    </pre>
    My code might be off, but hopefully you get the idea. Basically, you check the string for an @ and a . in the order of "X@X.X" where the X's can be anything. There has to be one or more characters, then an "@", then one or more characters, then a "." for the address to be valid.

    Does that help?


    hth,
    Deep (just a guy)
    <font face="arial" size="2">
    Pradeep Kumar Nair, B.Math
    President/CEO
    http://www.deepmultimedia.com
    ICQ: 39102360
    </font>
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  4. #4
    Join Date
    May 2002
    Location
    North Canton, Ohio
    Posts
    12

    Default

    Thank You! Much help...

    Creative Minds Distort Reality TM
    IP

 

 

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
  •