Assistance with method in guessing game

Hey guys I developed a method called processGuess which gets an array of ints passed to its parameter, adds the guess and its results to the guessHistory string and then returns a boolean depending if the guess is a winner or not. heres my algorithm:
public boolean processGuess(int[] guess)
        for(int i=0;i<boardSize;i++)
            guessHistory+=guess[i]+"  ";
        guessHistory+="\t"+getGuessResults(guess)+"\n";
        String mysteryNums=getMysteryNumbers();
        String theResults=getGuessResults(guess);
        boolean haveWinner=false;
        if(mysteryNums.length()==theResults.length())
            haveWinner=true;
            for(int i=0;i<theResults.length();i++)
                if(theResults.charAt(i)!='X')
                   haveWinner=false;
        return haveWinner;
    } // end method processGuessthe logic is if the guess results is the same length as the mystery numbers haveWinner is true and provided that all characters in the results are 'X" (a correct number in the correct position) then haveWinner remains true but the first character that is a # haveWinner is set to false. This seems logical but it isn't declaring a winner when the correct numbers are guessed.

ok i opened it but i cant figure how to run it in BlueJ without a right click button on the mouse..hmmm.
I have no idea how to execute main.
Heres the other two methods:
public String getMysteryNumbers()
        String numsStr="";
        for(int i=0;i<boardSize;i++)
            numsStr+=mysteryNumbers[i]+" ";
        return numsStr;
private String getGuessResults(int[] guess)
        int[]mysteryNumCopy=new int[boardSize];
        for(int i=0;i<boardSize;i++)
            mysteryNumCopy=mysteryNumbers[i];
int positionCorrect=0;
int numCorrect=0;
String results ="";
//for loop to compare if the guess is the same number and in the
//correct position
for(int i=0;i<boardSize;i++)
if(guess[i]==mysteryNumCopy[i])
positionCorrect++;
guess[i]=0;
mysteryNumCopy[i]=-1;
//for loop with nested for loop to compare if guess is any one of
//the mystery numbers
for(int i=0; i<boardSize; i++)
for(int j=0; j<boardSize; j++)
if(guess[i]==mysteryNumCopy[j])
numCorrect++;
guess[i]=0;
mysteryNumCopy[j]=-1;
//for loops to add the results to the string returned
for(int i=0;i<positionCorrect;i++)
results+="X";
for(int i=0;i<numCorrect;i++)
results+="#";
return results;
}Appreciate all the help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Assistance with AS2 in Flash Games to Load Multiple Levels

    We have a Flash game that we are creating in CS3 with AS2 with 3 levels that should load the next one dynamically when you win the previous level. Can someone please provide a tutorial or sample code to accomplish this as simply as possible?

    Your design will be too specific to expect to find a tutorial.  If you (or whoever coded what you have now) use the Help files or Google to look up the functions I mentioned, there will be sample code to help you/them to learn how to implement it. 4n

  • Need help with " Number guessing game " please?

    This is what teacher requires us to do for this assignment:
    Write a program that plays a simple number guessing game. In this game the user will think of a number and the program will do the guessing. After each guess from the program, the user will either indicate that the guess is correct (by typing �c�), or that the next guess should be higher (by typing �h�), or that it should be lower (by typing �l�). Here is a sample output for a game. In this particular game the user thinks of the number 30:
    $java GuessingGameProgram
    Guess a number between 0 and 100
    Is it 50? (h/l/c): l
    Is it 25? (h/l/c): h
    Is it 37? (h/l/c): l
    Is it 31? (h/l/c): l
    Is it 28? (h/l/c): h
    Is it 29? (h/l/c): h
    Is it 30? (h/l/c): c
    Thank you for playing.
    $
    This program is implementing a binary search algorithm, dividing the range of possible values in half with each guess. You can implement any algorithm that you want, but, all things being equal, binary search is the best algorithm.
    Write the program so that the functionality is split between two classes: GuessingGameProgram, and NumberGuesser.
    GuessingGameProgram will only be used for its main function. It should instantiate a NumberGuesser, and it will be responsible for the loop that notifies the user of the next guess, reads the �h�, �l�, or �c� from the user, and sends an appropriate message to the number guesser accordingly.
    The guesses themselves should all be generated by the NumberGuesser class. Here is a diagram of the members and methods for the class. Notice that the members are unspecified. Feel free to give your NumberGuesser class any members (which we have also been calling fields, or instance variables) that you find useful. Make them all private.
    NumberGuesser
    NumberGuesser(int upperLimit, int lowerLimit)
    int guess()
    void higher()
    void lower()
    The constructor should take two integer arguments, a lower and upper bound for the guesses. In your program the constructor will be called with bounds of 0 and 100.
    The guess method should return the same value if it is called more than once without intervening calls to the lower or higher methods. The class should only change its guess when it receives a message indicating that its next guess should be higher or lower.
    Enjoy. Focus your attention on the NumberGuesser class. It is more interesting than the GuessingGameProgram class because it is a general-purpose class, potentially useful to anybody who is writing a number guessing game. Imagine, for instance, that a few weeks from now you are asked to write a number guessing game with a graphical Java Applet front end. If you NumberGuesser class is well written, you may be able to reuse it without any modifications.
    I'm new to JAVA and I'm set with my 2nd homework where I'm so confused. I know how to do something of this source in C language, but I'm a bit confused with Java. This is the code me and my classmate worked on, I know it's not 100% of what teacher asked, but is there any way possibly you guys could help me? I wrote this program if the game is played less then 10 times, thought I would then re-create a program without it, but now I'm confused, and my class book has nothing about this :( and I'm so confused and lost, can you please help? And out teacher told us that it's due the end of this week :( wish I knew what to do. Thank you so so much.
    Here's the code:
    import java.text.*;
    import java.io.*;
    class GuessingGame
    public static void main( String[] args ) throws IOException
    BufferedReader stdin = new BufferedReader(new InputStreamReader( System.in ) );
    int guess = 0, limit = 9, x = 0, n, a = 0 ;
    double val = 0 ;
    String inputData;
    for ( x = 1; x <= 10; x++)      //number of games played
    System.out.println("round " + x + ":");
    System.out.println(" ");
    System.out.println("I am thinking of a number from 1 to 10. ");
    System.out.println("You must guess what it is in three tries. ");
    System.out.println("Enter a guess: ");
    inputData = stdin.readLine();
    guess = Integer.parseInt( inputData );
    val = Math.random() * 10 % limit + 1;     //max limit is set to 9
    NumberFormat nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(0);               //format number of decimal places
    String s = nf.format(val);
    val = Integer.parseInt( s );
         for ( n = 1; n <= 3; n++ )      //number of guess's made
                   if ( guess == val)
                        System.out.println("RIGHT!!");                    //if guess is right
                        a = a + 1;
                        System.out.println("You have won " + a + " out of " + x + " rounds");
    System.out.println(" ");
    n = 3;
    continue;
              if (n == 3 && guess != val)                         //3 guesses and guess is wromg
                        System.out.println("wrong");
    System.out.println("The correct number was " + val);
                        System.out.println("You have won " + a + " out of " + x + " rounds");
    System.out.println(" ");
    continue;
                   //how close guess is to value
                   if ( guess == val - 1 || val + 1 == guess) //Within 1
                   System.out.println("hot");
         else if ( guess == val - 2 || val + 2 == guess) // Within 2
                   System.out.println("warm");
              else
                   System.out.println("cold");                         // Greater than 3
         inputData = stdin.readLine();
         guess = Integer.parseInt( inputData );
    //ratings
    if ( a <= 7)
         System.out.println("Your rating is: imbecile.");
    else if ( a <= 8)
         System.out.println("Your rating is: getting better but, dumb.");
    else if (a <= 9)
         System.out.println("Your rating is: high school grad.");
    else if ( a == 10)
         System.out.println("Your rating is: College Grad.!!!");

    Try this.
    By saying that, I expect you ,and your classmate(s), to study this example and then write your own. Hand it in as-is and you'll be rumbled as a homework-cheat in about 20ms ;)
    When you have an attempt where you can explain, without refering to notes, every single line, you've cracked it.
    Also (hint) comment your version well so your tutor is left with the impression you know what you're doing.
    In addition (huge hint) do not leave the static inner class 'NumberGuesser' where it is. Read your course notes and find out where distinct classes should go.
    BTW - Ever wonder if course tutors scan this forum for students looking for help and/or cheating?
    It's a double edged sword for you newbies. If you ask a sensible, well researched question, get helpful answers and apply them to your coursework, IMHO you should get credit for doing that.
    On the other hand, if you simply post your assignment and sit there hoping some sucker like me will do it for you, you should be taken aside and given a good kicking - or whatever modern educational establishments consider appropriate abmonishment ;)
    I'd say this posting is, currently, slap bang between the two extreemes, so impress us. Post your solution in the form you intend to hand it in, and have us comment on it.
    Good luck!
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    public class GuessingGame
         public static void main(String[] args)
              throws Exception
              BufferedReader reader= new BufferedReader(
                   new InputStreamReader(System.in));
              NumberGuesser guesser= new NumberGuesser(0, 100);
              System.out.println(
                   "\nThink of a number between 0 and 100, oh wise one...");
              int guess= 0;
              while (true) {
                   guess= guesser.guess();
                   System.out.print("\nIs it " +guesser.guess() +"? (h/l/c) ");
                   String line= reader.readLine();
                   if (line == null) {
                        System.out.println(
                             "\n\nLeaving? So soon? But we didn't finish the game!");
                        break;
                   if (line.length() < 1) {
                        System.out.println("\nPress a key, you muppet!");
                        continue;
                   switch (line.toLowerCase().charAt(0)) {
                        case 'h':  
                             guesser.higher();
                             break;
                        case 'l':     
                             guesser.lower();
                             break;
                        case 'c':
                             System.out.println("\nThank you for playing.");
                             System.exit(0);
                        default:
                             System.out.println(
                                  "\nHow hard can it be? Just press 'h' 'l' or 'c', ok?");
                             continue;
                   if (guess == guesser.guess()) {
                        System.out.println(
                             "\nIf you're going to cheat, I'm not playing!");
                        break;
         private static class NumberGuesser
              private int mLower;
              private int mUpper;
              private int mGuess;
              NumberGuesser(int lowerLimit, int upperLimit)
                   mLower= lowerLimit;
                   mUpper= upperLimit;
                   makeGuess();
              private void makeGuess() {
                   mGuess= mLower + ((mUpper - mLower) / 2);
              int guess() {
                   return mGuess;
              void higher()
                   mLower= mGuess;
                   makeGuess();
              void lower()
                   mUpper= mGuess;
                   makeGuess();
    }                  

  • Need help with a guessing game

    Hi. hopefully, this is a really easy issue to resolve. I had to write a program that administers a guessing game, where the computer chooses a random number, and the user has to guess the number. If the user doesn't get it within 5 guesses, they lose and start all over with a new number. I have this all in a while loop (as per my instructions). My issue is that whenever the user enters 0, the program should quit with the users final score and so on. My program will not quit unless the 0 is entered on the last (fifth) guess. please help, it would be very appreciated. Here is my code:
    import java.util.Scanner;
      public class guessgame {
        public static void main(String[] args) {
          Scanner scanner = new Scanner (System.in);
            int randnum;        //random number generated by computer
            int userguess = 1;      //number the user guesses
            int userscore = 0;      //number of correct guesses by user
            int compscore = 0;      //number of times not guessed
            int guessnum = 0;       //number of guesses for one number
            int gamenum = 0;        //number of games played
        System.out.println ("I will choose a number between 1 and 10");
        System.out.println ("Try to find the number using as few guesses as possible");
        System.out.println ("After each guess i will tell you if you are high or low");
        System.out.println ("Guess a number (or 0 to quit)");
        while (userguess != 0) {
          randnum = 1 + (int)(Math.random() * 10); //generates random number
          gamenum ++;
          userguess = userguess;
            for (guessnum = 1; guessnum < 6 && userguess != randnum; guessnum ++) {
                userguess = scanner.nextInt();
                userguess = userguess;
               if (guessnum >= 5) {
                  System.out.println ("You did not guess my number!");
                                  } //closes if statement
               if (userguess == randnum) {
                 userscore ++;
                 System.out.println ("You guessed it! It took you " + guessnum + " tries.");
                 System.out.println ("If you want to play again, enter a guess");
                 System.out.println ("If you do not want to play again, enter 0");
                                        } //closes if statement
               else if (userguess < randnum)
                 System.out.println ("Your guess is too low");
               else if (userguess > randnum)
                 System.out.println ("Your guess is too high");
                                                          }//closes for loop
                              } //closes while loop
    compscore = gamenum - userscore;
            System.out.println ("Thanks for playing! You played " + gamenum + " games");
            System.out.println ("Out of those " + gamenum + " games, you won " + userscore + " times");
            System.out.println ("That means that I won " + compscore + " times"); 
    } //closes main
    } //ends guessgame class

    The problem with your program is that the while loop doesn't get checked. The condition of the while loop will only get checked each iteration, and not during one iteration. The time you are in your for-loop is still one iteration so it won't check if userguess is 0. see it liek this
    While: is userguess 0, no, do 1 iteration
    while-iteration-forloop: check 5 guesses, userguess can be anything even 0 while loop won't stop.
    end of for loop
    end of while-iteration
    new while iteration, is userguess 0?
    and so on.
    HTH,
    Lima

  • Help with action script number guessing game

    can someone help me in flash cs6 to make a simple guessing game, i just need help with the coding. making a guessing game from 1-100
    The constructor is coded to assign a random number for
    the user to guess
    • In the section of code indicated by the comments
    (within the handler function doGuess()), write condition
    statements that guide the user to guessing the number
    using text written to the output
    • Trace out the users' guess, plus a message
    • Messages for the user depending how close they are from the
    guess, condition each of the following:
    • Guesses correctly, +/-1 from the guess, +/-10 from the guess,
    +/-20 from the guess, +/-40 from the guess, all other guesses

    close, it's actually an in class practice lab. After doing this we have to do another one that needs to be submitted. I just need help with the coding for this because i dont know how to start at all. let alone the actual lab.

  • AC3 help (number guessing game)

    Hello I have a problem, im fairly new to action script and flash in general but heres my code:
    //These are the variables.
    var beginMessage:String;
    var randomNumber:uint;
    var guess:uint;
    //It disables the play again button so only the guess button is usable.
    playagain_btn.enabled =false;
    guess_btn.enabled = true;
    //shows a message in the message_txt box.
    beginMessage="Choose a number between 1 - 100.";
    message_txt.text=beginMessage;
    //Basically only allows numbers between 0-9...
    input_txt.restrict="0-9";
    input_txt.text="";
    //This stores a random number between 100 and 1.
    randomNumber = Math.floor(Math.random() * 100 + 1);
    //Adds an event listener to the guess button.
    guess_btn.addEventListener(MouseEvent.CLICK, yourGuess);
    function yourGuess(event:MouseEvent):void {
    guess=uint(input_txt.text);
    //This checks if the guessed number is greater than the random number.
    if (guess > randomNumber) {
    message_txt.text = "Your guess, " +  guess + " is too damn high.";
    //This checks if the guessed number is lower than the random number.
    else if (guess < randomNumber) {                       
    message_txt.text = "Your guess, " +  guess + " is too low.";         
    //This displays a message when the correct number is guessed.  
    else{        
    message_txt.text = "congratulations ,the number is " + randomNumber + ".";
    winGame();        
    function winGame():void{       
    //Disables the guess button and enables the play again button.         
    guess_btn.enabled = false;         
    playagain_btn.enabled = true;          
    //This removes a listener from the yourguess button and adds a
    //listener to playagain
    guess_btn.removeEventListener(MouseEvent.CLICK, yourGuess);         
    playagain_btn.addEventListener(MouseEvent.CLICK, guessAgain);
    function guessAgain(event:MouseEvent):void{         
    //Runs the init() method.         
    init();
    //Runs the init() method.
    init();
    //this part of the script is for the number
    //Declare variables
    var numOfGuesses:uint ;
    var numOfGuessesMessage:String;
    function init():void {
        //Displays a message showing the total number of guessing remaining
        numOfGuesses = 6;
        numOfGuessesMessage = " Guesses remaining";
        guess_txt.text = numOfGuesses + numOfGuessesMessage;
    if(numOfGuesses == 0){
            message_txt.text = "The number was " + randomNumber + "."; 
            guess_txt.text = "you lose!!!!!! D:!!.";
            winGame();
    function yourGuess(event:MouseEvent):void {
        guessMessage();
    function guessMessage():void{
        //Only decrement the numOfGuesses if the text field contains characters.
        if(input_txt.length > 1 && numOfGuesses != 0){
            numOfGuesses--;
            guess_txt.text = numOfGuesses + numOfGuessesMessage;
    And my errors are duplicate function definition. theres the code its crying about.
    function yourGuess(event:MouseEvent):void {
        guessMessage();
    what Im doing here is making a number guessing game, everything works but the number of guesses wont go down.

    Put a trace in the function where you try to decrease the number of guesses and see if the logic is letting you get in to change it...
      function guessMessage():void {
       //Only decrement numofGuess if the input field has characters.
    trace(input_txt.length, numOfGuesses)
       if(input_txt.length > 1 && numOfGuesses != 0){
        numOfGuesses--;
        guess_txt.text = numOfGuesses + numOfGuessesMessage;
      //When guesses have ran out, A message will appear saying you can reset.
      if(numOfGuesses == 0){
       message_txt.text = "The number I was thinking was " + randomNumber + ".";
       guess_txt.text = "Press play again to try again";
      winGame(event:MouseEvent);
    If you happen to be changing frames where you leave the frame with this code and then come back to it, then you are likely running into this line again....
    numOfGuesses = 6;
    which resets the number of guesses.

  • Upgrading: Migration Assistant with FireWire or Time Machine Restore?

    Hello,
    I recently ordered a new Black Penryn MacBook to replace my 17" iMac. Would you recommend using the Migration Assistant with FireWire or a Time Machine restore in order to copy all of my data to the MacBook? I have the option to do both, but am unsure of which would be the best. Is the time machine restore more suited to restore a failed drive as opposed to facilitating a data transfer between two machines? Finally, regarding either of the transfer options, will there be any issues with keychain or application data that I should be aware of? Thanks for your help!

    Those are two of the option presented by Migration Assistant. I think the end result will be the same. If I was doing it, I'd use the FireWire method, just because it's coming directly from the source instead of through a backup archive structure.

  • OXS server 3 with mavericks, it will not load up the assistant with open directory and will not allow me to use old open directory it was not a clean install just upgrade. any help or advise appreciated as i really need the server.

    OXS server 3 with mavericks, it will not load up the assistant with open directory and will not allow me to use old opeopen directory and will not allow me to use old open directory it was not a clean install just upgrade. any help or advise appreciated as i really need the server.

    I wonder if the disk being referred to is actually your iPod which is not plugged in. Maybe something has stuck thinking the iPod should be there.
    Try completely removing all the iTunes related programs according to this method.
    http://support.apple.com/kb/HT1923
    Restart you PC and see if startup improves.
    If it doesn't improve you need to consider the possibility that there is something else going on.
    If The problem goes away, hopefully a fresh install will be OK.

  • Guessing Game Problem

    I'm having a problem thinking of a way to think of a solution to this. Basically, what I am trying to do is have a guessing game with the computer. What happens is I think of a number from 1000 to 9999, let's say 3741. Then the computer randomnly guesses from an ArrayList of 1000-9999, and asks if its the right number, or not. Let's say the computer guesses 5312. I would respond by saying how many matches there are 0-4, in this case 4. Then my idea is to update the arrayList, by deleting all the necessary values. I would do this continuously until one number is left, which would be the correct answer. I am trying to think of an algorithm that would do this in 15 guesses or less (aiming for 10ish).
    My code so far:
    // fill in your information in the line below, and comment it out in order to compile
    // Name: ???   Student ID: ???;
    import java.util.ArrayList;
    import java.util.Random;
    import javax.swing.JOptionPane;
    public class Assignment2 {
    private int totalGuesses;
    private ArrayList<Integer> guess;
    private int myGuess;
    public Assignment2 ( ){
    totalGuesses = 0;
    myGuess = 0;
    guess = new ArrayList<Integer>();
    for(int i = 1000; i <= 9999 ; i++) // Adds numbers 1000 to 9999 initially.
       guess.add(i);
    public int myGuessIs() {
      return myGuess;
    public int totalNumGuesses() {
      return totalGuesses;
    public void updateMyGuess(int nmatches) {
      // fill in code here
      // update the guess based on the number of matches claimed by the user
    if(guess.size() == 0)
      myGuess = -1;
    // you shouldn't need to change the main function
    public static void main(String[] args) {
      Assignment2 gamer = new Assignment2( );
      JOptionPane.showMessageDialog(null, "Think of a number between 1000 and 9999.\n Click OK when you are ready...", "Let's play a game", JOptionPane.INFORMATION_MESSAGE);
      int numMatches = 0;
      int myguess = 0;
      do {
       myguess = gamer.myGuessIs();
       if (myguess == -1) {
        JOptionPane.showMessageDialog(null, "I don't think your number exists.\n I could be wrong though...", "Mistake", JOptionPane.INFORMATION_MESSAGE);
        System.exit(0);
       String userInput = JOptionPane.showInputDialog("I guess your number is " + myguess + ". How many digits did I guess correctly?");
       // quit if the user input nothing (such as pressed ESC)
       if (userInput == null)
        System.exit(0);
       // parse user input, pop up a warning message if the input is invalid
       try {
        numMatches = Integer.parseInt(userInput.trim());
       catch(Exception exception) {
        JOptionPane.showMessageDialog(null, "Your input is invalid. Please enter a number between 0 and 4", "Warning", JOptionPane.WARNING_MESSAGE);
        numMatches = 0;
       // the number of matches must be between 0 and 4
       if (numMatches < 0 || numMatches > 4) {
        JOptionPane.showMessageDialog(null, "Your input is invalid. Please enter a number between 0 and 4", "Warning", JOptionPane.WARNING_MESSAGE);
        numMatches = 0;
       if (numMatches == 4)
        break;
       // update based on user input
       gamer.updateMyGuess(numMatches);
      } while (true);
      // the game ends when the user says all 4 digits are correct
      System.out.println("Aha, I got it, your number is " + myguess + ".");
      System.out.println("I did it in " + gamer.totalNumGuesses() + " turns.");
    Obviously, I'm having trouble thinking of a solution to updateMyGuess...I don't know why but I'm most likely making this way harder than it actually is.. Can anyone help?

    borisan wrote:
    What happens is I think of a number from 1000 to 9999, let's say 3741. Then the computer randomnly guesses from an ArrayList of 1000-9999, and asks if its the right number, or not. Let's say the computer guesses 5312. I would respond by saying how many matches there are 0-4, in this case 4. Don't you mean 0?
    What if computer's guess is 2795. I assume number of matches then would be 1 (the 7). How exactly is your code going to know that 7 is the lone match and not the 2 or the 9 or the 5?

  • Assistance with export query

    Greetings,
    I am hoping to get some assistance with what I am thinking should be a simple content export. I am running UCM 11g with Folders_g. I have some root folder named rootfolder which has 30 or so content items directly in it and then 100 or so sub-folders. I have already migrated all the subfolders with their content successfully. Now I only need to export the remaining 30 or so items directly in the rootfolder. This sounds simple, but when I select that root folder using Folder Structure Archive, even though I do not place a check mark in any of the subfolders, the resultant export took 4 hours had over 160,000 items. I am only expecting these 30 or so items. How can I form a query to get only these? Idea i am thinking of is maybe to query for content which has parent folder id of rootfolder?
    Thank you in advance for any help,
    -Kaycee

    Thank you Jonathan - I wasn't receiving email notifications for this thread, so i wasn't aware that you had replied.
    After "playing" around, I did end up with a successful export of the source folder's 30 items by using this query: xCollectionID = valueforfolder and dReleaseState = 'Y'
    This did work, but there still remains for me some confusion around the use of Folder Structure Archive. I guess I was expecting that when using Folder Archive Configuration only, by checking the box of my intended parent folder and no other sub-folders under that box, that it should have exported it's 30 content items. And not the content items of the +/-100 sub-folders. I did not expect to have to add a content export query to refine/achieve the result. Simply, when using folder structure archive, shouldn't the export of content only pertain to the folder's checkbox you have marked?
    Thanks again,
    Kaycee

  • Word guessing game Flash Develop as3

    I am coding a word guessing game for primary level age 5/6. They have to guess a five letter word by looking at the image. I want to provide a clue button, which when clicked will give the user one correct letter. There are five words contained in an array. I want to give one letter as a clue. Here is my current code (not completed). If anyone has any ideas, they would be greatly appreciated as havn't done this before!!
                        public function clue(event:MouseEvent):void {
                                  for (var  i : uint = 0; i < 5; i++)
                                  if (this["text" + i].text != currentWord.charAt(i))
                                                                //changing colour to red
                                                                trace ("checking if equal");
                                                                this ["button" + i] = setImage("../images/red2.png", 405 + (40 * i), 600);
                                                                this["button" + i].visible = true;
                                                                //need to give the user one correct letter
                                                                ["Text"+i] == currentWord.charAt(i)

    Hi Ned,
         Mt current Word is the current word in my Array which could be any out of 5. The current letter was i was trying to get a letter out of the current Word in the array and provide one correct letter as a clue to the user. The text+i is the letter/word at position i in the array. I basically took my method for search for char and tried to change it for searching for letters instead of words but not really sure what i am doing. Here is search for char code i was basing the other one on. This method checks the letters inputed into the 5 textfields against the current word in the array and changes coloured cirlces underneath each letter to yellow if correct and red if incorrect.
    public function searchForChar(evt:MouseEvent):void {
                                  trace ("coming in here");
                                  //make sure all text fields have been entered
                                  for (var  i : uint = 0; i < 5; i++)
                                            trace ("looping");
                                            //if letter is right
                                            if (this["text" + i].text == currentWord.charAt(i))
                                                      //changing colour to yellow
                                                      trace ("checking if equal");
                                                      this ["button" + i] = setImage("../images/yellow2.png", 405 + (40 * i), 600);
                                                      this["button"+i].visible = true;
                                                      else
                                                                if (this["text" + i].text != currentWord.charAt(i))
                                                                //changing colour to red
                                                                trace ("checking if equal");
                                                                this ["button" + i] = setImage("../images/red2.png", 405 + (40 * i), 600);
                                                                this["button" + i].visible = true;

  • Creating a word-based guessing game

    Hi...
    I'm currently producing a experimental flash project, which
    involves both comic-book style imagery, animation and
    puzzle-solving whereby the user must solve a riddle in order to
    progress through the story. Of course, the whole project involves
    one bit of Actionscript 2 on each page in order to get it to work
    but so far I've only been able to find code for a guessing game
    with numbers.
    The following code is how I've tried to handle this: I'm
    fairly new to Actionscript so please forgive me! I've attached this
    code to my "answer_btn" button. "Input" refers to the input textbox
    in which the correct answer must be typed.
    Thanks for your help!

    Input is not the same as input.
    if input is the instance name of your textfield, you need to
    use its text property. if input is the variable associated with
    your textfield, you're ok.
    you have a paranthesis mismatch on your 2nd line of code.
    remove one right paranthesis.
    if your button is a true button (not a movieclip button),
    you're directing the parent timeline of the timeline that contains
    your button to play "riddle_story".

  • How can I access my parents iCloud account remotely to assist with photo management and printing?

    How can I access my parents iCloud account remotely to assist with photo management and printing?

    I tried that without any luck. I was hoping I could get Apple to reset it for me or delete the account so I could recreate it or at least tell me what is listed as my birth date, the security question answer.

  • Is there a way to stop being bombarded with IAds when playing games on the iPad? This is a very annoying new way to advertise Apps.

    Is there a way to stop being bombarded with IAds when using games on my IPad? Is this a new way to advertise Apps?

    If these are the free versions of the games, buy the full version and the iAds should go away. The developer can offer the app for free by selling advertising. If the developer is going to give the app away, he has to be paid for his work somehow.
    There may be some paid apps that might include iAds as well. In those instances, the developer includes the ads in order to subsidize the cost of the app to the end user in order to reduce the cost of the app. You should always read the app description when you download any app to make sure that you know what you are getting into - with regard to ads and in-app purchases.
    Games are the worst offenders - IMO. Many "free" games become totally useless after you reach a certain level or if you reach your limit in lives or potions or things like that. If you want to continue in the game, you than have to make in-app purchases for levels, lives, potions, beads, whatever. You can rack ip quite a bill playing those "free" games if you are not aware of what you are getting into.

  • On closing Photoshop CC, I am getting an error message on screen that read's "Selective Palette error: no element found at line 1. Are you able to assist with this problem?

    Can anyone shed some light on this error message I am getting upon closing Photoshop CC
    I am getting an error message on screen that read's "Selective Palette error: no element found at line 1. Are you able to assist with this problem?

    Same issue here in WI and for me it was at 6:36p CST.
    I'm changed my password, removed iCloud from my phone ... tried 3G and WIFI with no luck. I also cannot check it on my Mac or iPad. I was able to get contacts and calenders back on my phone but no mail yet.
    Did the whole Apple support thing and apparently I'm part of the 1%
    EDIT: Question: are all of you former MobileMe users as well? Just wondering because I know there were going to be some changes as they completely move MobileMe over to iCloud and drop the "extra" services. I just can't remember if it was just a single cut off date or a series of dates. THAT email is stuck in my iCloud folders.

Maybe you are looking for