A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Remembering name

  1. #1
    Member
    Join Date
    Jun 2005
    Posts
    45

    Remembering name

    If I want to make a game where the user types their name in at the beginning and then later on if they do something good it says "Well done (their name)!"

    How would I go about it?

    Thanks

  2. #2
    Senior Member
    Join Date
    Oct 2004
    Posts
    2,049
    //frame 1 create a var to hold the username
    var username

    // setting the username from the imputbox
    _root.username = myimput.text;

    //calling the name back later
    myshowname.text = "Well done " + _root.username;


    if you want to remember the username each time they come back to your site - read up on shared objects.

  3. #3
    Member
    Join Date
    Jun 2005
    Posts
    45
    thanks, unfortunately i'm a bit of a noob when it comes to this kind of thing so i'm still a little confused.

    I put the var username in frame 1

    But then where do the other bits of code go

    I asume I use an input box for them typing their name, and a dynamic text box for displaying it later.

    Basicly I haven't used variables or input/dynamic text before so it's all new to me.

  4. #4
    Member
    Join Date
    Jun 2005
    Posts
    45
    Wait, got it working.

    Thanks for the help

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