A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Passing a variable to a dynamic text field

Threaded View

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Posts
    2

    Passing a variable to a dynamic text field

    I have been trying to create a small hangman game. I have a variable that is created from an array and is passed to a dynamic text field from another scene into the main scene and inside a movieclip. I know it must be just my referencing, but I have tried everything and it's driving me crazy.

    It looks like this (which might mean nothing so I have included the file for download):

    hangman.prototype.getWord = function() {

    randomNumber = Math.round(Math.random()*(wordlist.length-1));
    selectedWord = wordList[randomNumber];

    lettersLeftToGo = selectedWord.length;

    for (i=0;i<selectedWord.length;i++){
    lettersNeeded[i] = selectedWord.charAt(i);
    }

    for (i=0;i<selectedWord.length;i++){
    lettersGuessed[i] = "?";
    }

    this.interface.display = lettersGuessed.join("");
    trace(this.interface.display);
    }

    Thankyou!!
    Attached Files Attached Files

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