Game Programming help needed!

Hi,
I'm new to these forums just as i am fairly new to Flash Pro
8, anyway i was mid way through creating my first flash game when i
encountered this error message...
**Error** Scene=Scene 2, layer=Layer 2, frame=25:Line 2: ')'
or ',' expected
gotoAndPlay('scene 2',frame 1);
Total ActionScript Errors: 1 Reported Errors: 1
it asks me to put an ')' or ',' in to the code but i just
cant work out where it wans me to put it. Please Help!!!!!
Thank You

The parameters are wrong.
The parameters should ne a scene name and a frame number or
frame label on that scene.
like . gotoAndPlay("myScene", 10);

Similar Messages

  • Basic Java Program help needed urgently.

    I have posted the instructions to my project assignment on here that is due tomorrow. I have spent an extremely large amount of time trying to get the basics of programming and am having some difficulty off of the bat. Someone who has more experience with this and could walk me through the steps is what I am hoping for. Any Help however will be greatly appreciated. I am putting in a lot of effort, but I am not getting the results I need. Thank you for the consideration of assisting me with my issues. If you have any questions please feel free to ask. I would love to open up a dialogue.
    CIS 120
    Mathematical Operators
    Project-1
    Max possible pts 100
    Write a program “MathOperators” that reads two integers, displays user’s name, sum, product,
    difference, quotients and modulus of the two numbers.
    1. Create a header for your project as follows:
    * Prgrammer: Your Name (1 pt) *
    * Class: CIS 120 (1 pt) *
    * Section: (1 pt) *
    * Instructor: (1 pt) *
    * Program Name: Mathematical Operators (1 pt) *
    * Description: This java program will ask the user to enter two integers and *
    display sum, product, difference, quotients and modulus of the two numbers
    * (5 pts) *
    2. Display a friendly message e.g. Good Morning!! (2 pts)
    3. Explain your program to the user e.g. This java program can add, subtract, multiply,
    divide and calculate remainder of any two integer numbers entered by you. Let’s get
    started…. (5 pts)
    4. Prompt the user- Please enter your first name, store the value entered by user in a
    string variable name. Use input.next() instead of input.nextLine(). (8 pts)
    5. Prompt the user- name, enter first integer number , store the value entered by user in
    an integer variable num1.(5 pts)
    6. Prompt the user- name, enter second integer number , store the value entered by user in
    an integer variable num2.(5 pts)
    7. Display the numbers entered by the user as: name has entered the numbers num1and
    num2.(5 pts)
    8. Calculate sum, product, difference, quotients and modulus of the two numbers. ( 30 pts)
    9. Display sum, product, difference, quotients and modulus of the two numbers. ( 10 pts)
    10. Terminate your program with a friendly message like- Thanks for using my program,
    have a nice day!!(2 pts)

    Nice try. You have not demonstrated that you've at least TRIED to do something. No one is going to do your homework for you. Your "urgency" is yours alone.

  • Dollar Change Program Help needed!!

    I need some immediate help writing a java program that determines change of 1 dollar recieved in the amout of quarters, dimes, and nickels when an item is purchased between the prices of 25cents and a dollar. For Example:
    Total Money: $1 (static)
    Enter the price of the item in cents: 45
    You bought an item for 45 cent and gave me a dollar, so your change is:
    2 quarters,
    0 dimes, and
    1 nickel.
    That is the basics of what I need, and I am not sure where to start.

    My program works as long as there is at least 1 penny to be given back in the change. I need help!
    //          CoinCounter.java
    //          This program counts the change given back from 1 dollar
    //          in specific values such as quarters, dimes, and nickels
    //          and pennies.
    //          Written By Jasen Hudson
    import javax.swing.*;
    import cs1.Keyboard;
    public class CoinCounter
    {// Begin class CoinCounter
         public static void main(String[] args)
              {// Begin main method
                   int cost = 0;
                   int dollar = 100;
                   int quarter = 25;
                   int dime = 10;
                   int nickel = 5;
                   int penny = 1;
                   int numQuarters = 0;
                   int numDimes = 0;
                   int numNickels = 0;
                   int numPennies = 0;
    //Item amount input
    String input = JOptionPane.showInputDialog
    ("Please enter the amount paid for the item.");
    cost = Integer.parseInt(input);
    //While statement
         int changeRequired = dollar - cost;
         while(changeRequired > 0){
              if((changeRequired - quarter>= 0){
              numQuarters ++;
                   changeRequired -= quarter;
                        continue;
              if(changeRequired - dime >= 0){
              numDimes ++;
                   changeRequired -= dime;
                        continue;
              if(changeRequired - nickel >= 0){
              numNickels ++;
                   changeRequired -= nickel;
                        continue;
              if(changeRequired - penny >= 0){
              numPennies ++;
                   changeRequired -= penny;
    //Amount of change needed to give back
         int change = dollar - cost;
    //System print out
         System.out.println("The change required for $1.00 from an item costing "
              + cost + " Cents is " +change+ ". Here is your change:");
              System.out.println(numQuarters+" Quarters");
              System.out.println(numDimes+" Dimes");
              System.out.println(numNickels+" Nickels");
              System.out.println(numPennies+" Pennies");
              System.exit(0);
    }

  • SOCKET PROGRAMMING  HELP NEEDED!!!!

    hi,
    I got an idea of establishing socket connection with all clients from SERVER through the windows command
    called (arp -a). when we type the stated command on dosprompt in server, it gives the list of current system's
    ipaddress.....switched on. SO i can establish socket connections in a for loop where i can take the following ipaddress from output listed from command.
    i've written the code to call the command in JAVA.
    i write the dosprompt output in a file named list1.txt
    import java.util.*;
    import java.io.*;
    import java.io.File;
    public class RunCommand
    public static String[] runCommand(String cmd) throws IOException
    ArrayList list = new ArrayList();
    Process proc = Runtime.getRuntime().exec(cmd);
    InputStream istr = proc.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(istr));
    String str;
    while ((str = br.readLine()) != null)
    list.add(str);
    try
    proc.waitFor();
    }catch (InterruptedException e)
    System.err.println("process was interrupted");
    // check its exit value
    if (proc.exitValue() != 0)
    System.err.println("exit value was non-zero");
    // close stream
    br.close();
    // return list of strings to caller
    return (String[])list.toArray(new String[0]);
    public static void main(String[] args) throws Exception
    try
    FileWriter f1=new FileWriter("list1.txt");
    String[] s = runCommand("arp -a");
    for (int i = 0; i< s.length; i++)
    f1.write(s);
    System.out.println(s[i]);
    f1.close();
    }catch (Exception ex) { System.out.println(ex);}
    SAMPLE OUTPUT:
    Interface: 172.16.3.1 on Interface 0x1000003
    Internet Address Physical Address Type
    172.16.3.4 00-00-e2-13-a9-e8 dynamic
    172.16.3.6 00-00-e2-13-aa-0f dynamic
    172.16.3.10 00-00-e2-13-ab-bb dynamic
    172.16.3.12 00-00-e2-13-ab-93 dynamic
    172.16.3.16 00-00-e2-13-37-b8 dynamic
    172.16.3.17 00-00-e2-13-37-19 dynamic
    172.16.3.18 00-00-e2-13-37-1d dynamic
    172.16.3.19 00-00-e2-13-38-98 dynamic
    172.16.3.22 00-00-e2-13-37-54 dynamic
    172.16.3.23 00-00-e2-13-39-02 dynamic
    172.16.3.24 00-00-e2-13-39-0f dynamic
    172.16.3.26 00-00-e2-13-37-a5 dynamic
    172.16.3.27 00-00-e2-13-37-0b dynamic
    172.16.3.28 00-00-e2-13-37-12 dynamic
    172.16.3.29 00-00-e2-13-39-15 dynamic
    172.16.3.30 00-00-e2-13-38-af dynamic
    172.16.3.31 00-00-e2-13-37-fe dynamic
    172.16.3.32 00-00-e2-13-38-ff dynamic
    172.16.3.34 00-00-e2-13-ab-c8 dynamic
    172.16.3.37 00-00-e2-13-ab-67 dynamic
    172.16.3.42 00-00-e2-13-ab-19 dynamic
    PLS HELP ME OUT IN GETTING ONLY THE IPADDRESS IN FOR LOOP IN SERVER SOCKET PROGRAM TO INVOKE ALL CLIENT'S PROGRAM IN NETWORK.
    PLS HELP ME!!!!!!!
    ATTACH THE CODE!!!!!!!!!!!!

    Connecting to a client presumes that the client is waiting for a connection.
    If that is the case I would suggest looking a java.net.Socket.

  • Install program help needed

    I am trying to install a software program on my destop computer, I am the administrator, running 7 Home Premium, 64 bit, I downloaded the program but when I try to install "Installer failed to initialize".  I turned off the antivirus program, that did not help.  I contacted Adobe for help, I did what they said, turn off antivirus, redownload,tried to install and again "Installer failed to initialize".  Any ideas as to what I can do?

    When requesting help you should always include the make/model (i.e. p6-xxxx) of the computer and/or monitor. This information is necessary for us to review the specifications of them.
    What is the program?  I presume that it is an Adobe product.
    Signature:
    HP TouchPad - 1.2 GHz; 1 GB memory; 32 GB storage; WebOS/CyanogenMod 11(Kit Kat)
    HP 10 Plus; Android-Kit Kat; 1.0 GHz Allwinner A31 ARM Cortex A7 Quad Core Processor ; 2GB RAM Memory Long: 2 GB DDR3L SDRAM (1600MHz); 16GB disable eMMC 16GB v4.51
    HP Omen; i7-4710QH; 8 GB memory; 256 GB San Disk SSD; Win 8.1
    HP Photosmart 7520 AIO
    ++++++++++++++++++
    **Click the Thumbs Up+ to say 'Thanks' and the 'Accept as Solution' if I have solved your problem.**
    Intelligence is God given; Wisdom is the sum of our mistakes!
    I am not an HP employee.

  • Programing help needed  urgently

    Please help with my home work I'm really stuck
    Read in an integer from the keyboard, then check to see whether it is :
    Positive or not
    Even or odd
    A multiple of 7 or not
    The number must be displayed together with each of the tests.
    I don't know how to check for a multiple of seven that were I had a problem.
    Here is the program that I have written so far. It is in java.
    import java.util.Scanner;
    public class hwork11
    public static void main (String[]args)
    Scanner input=new Scanner (System.in);
    System.out.println("please enter a number");
    int num=input.nextInt(System.in);
    if(num>0)
    System.out.println(num+" is negative"):
    else
    System.out.println(num+" is positive");
    if( num%2 == 0)
    System.out.println(num+" even number");
    else
    System.out.println(num+" odd number");
    }

    Vee190 wrote:Please help with my home work I'm really stuck
    Read in an integer from the keyboard, then check to see whether it is :
    Positive or not
    Even or odd
    A multiple of 7 or not
    The number must be displayed together with each of the tests.
    I don't know how to check for a multiple of seven that were I had a problem.
    Here is the program that I have written so far. *{color:#0000ff}({color}* It is in java. *{color:#0000ff}r u kiddin me )*
    *{color}*
    import java.util.Scanner;
    public class hwork11
    public static void main (String[]args)
    Scanner input=new Scanner (System.in);
    System.out.println("please enter a number");
    int num=input.nextInt(System.in);
    if(num>0) *{color:#0000ff}( I think that numbers >0 are +. Whuddya think?){color}*
    System.out.println(num+" is negative"):
    else
    System.out.println(num+" is positive");
    if( num%2 == 0) *{color:#0000ff}If num is 4, do know why this statement is true? (num % 2 == 0)*
    **The key to answering your question about whether or not a number is a multiple of 7 is understanding the use of the % operator. Look it up, and figure it out. You will learn programming languages much faster if you understand what it is you are typing, rather than just trying to make a program by copying lines of code out of the book.*{color}*
    System.out.println(num+" even number");
    else
    System.out.println(num+" odd number");

  • Program help needed?

    1. class A555{
    2.     public static void main(String []args){
    3.          Boolean b1 = new Boolean(true);
    4. Boolean b2 = new Boolean(true);
    5. System.out.println( false +" " );
    6.     }
    7. }
    Regarding the above question, at line 5 if i use a boolean literal the program doesn't give any error but whenever i am using b1==b2 *(the two Boolean objects declared,initialized at 3 and 4)* in place of boolean literal, i am getting a compiler compiler error: incomparable types: java.lang.Boolean and java.lang.String . Kindly tell me what could be the reason?

    If you do:
    System.out.println(b1==b2 + " ");
    The compiler will try to make: b1 == (b2 + " ")
    so he is trying to add a string " " to the b2
    if you make: System.out.println((b1==b2) + " "); that should work
    this is a problem of precedence with the operators
    Hope this help!
    Alex

  • Some programming help needed

    I'm trying to make an alarm clock... I've done all the code but I don't know how to play sounds... I've seen that there is some sort of class for sounds with applets, but I didn't make an applet. It's just normal AWT... can anybody help me out? .....also, is there a more efficient way of 'updating' the clock-label? I used a while loop, but I don't think it's the way it's supposed to be done.
    thanks

    I am not sure what you mean by using a while loop to update the clock-label. I would have used a Timer class to change the time at the given intervals (say every second).

  • Game center help needed

    I set up an account on Game Center but then when I went to login I got a message saying I had to create a profile, but I already have. How do I fix this?

    The fact that tapping on buttons in game center and not getting a positive response seems to imply a problem with app, not the device... by rebooting, do you mean turn it off and then turn it on, or reset everything?
    As a last resort, I would advise that you backup your IPad to a computer, save all you stuff, and reset the iPad, bringing it back to factory settings.
    Put all you stuff back on and then see if it works... if it doens't, It could be the update

  • Socket Based Server/Client Program Help Needed

    Alright,
    I am making a Client/Server program.
    The idea is that, when I run the 'Server' part, it sits and listens for a connection from the Client.
    The Client writes a string to the socket, then the server, interprets the command.
    This is what I have so far.
    The Server:
    public static void main(String[] args) {
             String clientLine = null;
              Socket channel = new Socket();
              try {
                   mainWin window = new mainWin();
                   window.open();
              } catch (Exception e) {
                   e.printStackTrace();
             try{
                   ServerSocket server = new ServerSocket(8313);
                  BufferedReader reader = new BufferedReader(new InputStreamReader(channel.getInputStream()));
                 channel = server.accept();
                 clientLine = reader.readLine();
                 doCommand(clientLine);
                 reader.close();
                 channel.close();
                 server.close();
             catch(IOException ioe){
                  System.out.println("I/O Exception occurred while using the server");
         }The Client:
    public void sendCommand(String command){
              PrintStream socketWriter  = null;
              try{
                    Socket client = new Socket("127.0.0.1", 8313);
                    socketWriter = new PrintStream(client.getOutputStream());
                    socketWriter.println(command);
                    socketWriter.close();
                    client.close();
              }catch(UnknownHostException uhe){
              }catch(IOException ioe){
         }When I press the command button, it lags for a second, then does nothing.
    Does anyone see the problem?

    public static void main(String[] args) {
             String clientLine = null;
              Socket channel = new Socket(); //<-- This is connecting to where? nowhere, so initiate it to null instead.
              try {
                   mainWin window = new mainWin();
                   window.open();
              } catch (Exception e) {
                   e.printStackTrace();
             try{
                   ServerSocket server = new ServerSocket(8313);
                  BufferedReader reader = new BufferedReader(new InputStreamReader(channel.getInputStream())); //<-- Getting an input stream from nowhere?
                 channel = server.accept(); //<-- Perhaps you want to do this before you try to get the input stream from it?
                 clientLine = reader.readLine();
                 doCommand(clientLine);
                 reader.close();
                 channel.close();
                 server.close();
             catch(IOException ioe){
                  System.out.println("I/O Exception occurred while using the server");
         }

  • New to Java Wireless Programming - Help needed!

    I'm currently finishing my 4 java programmign class in university, and i'm not looking to expand my knowledge in the this language. I would like to learn the how to code for wireless devices. I've already downloaded the Java Wireless Toolkit, but I would really appreciate some direction on what I should read to know where to start with this. Any info that anyone may have is greatly appreciated!
    Thanks
    Al

    Googling J2ME tutorials or MIDP tutorials will give you plenty to read.
    but here's a start:
    http://www.developer.com/java/j2me/article.php/10934_1561591_1
    http://developers.sun.com/techtopics/mobility/midp/samples/index.html#getstart

  • About server in game programming

    hi,
    from what i know, we need a web server like tomcat or blazix to make other people can access our web. but my problem is like this..... i develop a game programming that need a server to control the player, so that mean now i have 2 server...... but when people acces my web, they cannot connect with my game server, so they cannot play the game..... so what should i do to make people can access my web and play the game?

    I presume this is about how to have a game run in the background on the server, outside of the web requests the user made to get to the game in the first place.
    What it comes down to is, you need some way to get the data back, asynchronously or pseudo-asynchronously. You have a few options...
    (1) Run a process on the server separate to the web server, which opens the game server socket, and does all the game stuff. Simplest solution.
    (2) Make a little servlet which initialises when your webapp starts up, and the init() method starts a thread, which opens the game server socket, and does all the game stuff. A little harder, but better because it will work even if you don't have a shell to the web server (e.g. if you're on a hosting provider who has given you just an FTP.)
    (3) Make a little servlet to perform the actual game functions, and either poll at regular intervals or have the servlet itself send the data back as a continuous stream. I personally like this solution the best, and it doesn't require a thread to sit there on the server wasting a thread, but it does make a single HTTP request last for a rather long time and also proxies can screw around with the data.
    Hope this helped somehow...

  • HELP NEEDED PLEASE

    Hi everyone
    Programming help needed here. Any advice would be greatly appreciated!!!
    I have been assigned some work for a program called Processing 1.0 availale at http://processing.org/download
    I was give the 9 individual programs I needed to make however they were converted to Java files from .pde files. The program is based on Java but only runs .pde files and NOTHING else!
    I decompiled the files and got the source code, but it is a slight variation of the original someone made in processing, and needs some tidying to get it to run.
    I think the programs are very simple for a programmer, although I AM NOT.
    CODE is BELOW
    // Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov Date: 02/05/2009 13:15:00
    // Home Page: http://members.fortunecity.com/neshkov/dj.html http://www.neshkov.com/dj.html - Check often for new version!
    // Decompiler options: packimports(3)
    // Source File Name: Assign2_1.java
    import processing.core.PApplet;
    public class Assign2_1 extends PApplet
    public Assign2_1()
    SquareSide = 20;
    Rank = Nums.length;
    Side = SquareSide * Rank;
    Green = color(0, 255, 0);
    Yellow = color(255, 255, 0);
    BG = Yellow;
    public void setup()
    size(Side, Side);
    background(BG);
    fill(Green);
    for(int i = 0; i < Rank; i++)
    rect(i * SquareSide, 0.0F, SquareSide, SquareSide * Nums);
    public static void main(String args[])
    PApplet.main(new String[] {
    "--bgcolor=#ece9d8", "Assign2_1"
    int Nums[] = {
    6, 14, 8, 9, 2, 3, 4, 2, 8, 3,
    9, 2, 0, 5
    int SquareSide;
    int Rank;
    int Side;
    int Green;
    int Yellow;
    int BG;
    Edited by: chevy1 on May 2, 2009 7:32 AM

    HELP NEEDED PLEASEShouting is a good way ensure you don't get help. Also you should give a meaningful subject.
    Any advice would be greatly appreciated!!!I suggest you ask a question after providing enough information to be able to answer it.
    Also use CODE tags when posting code as it make the code more readable.
    We are more likely to help people who are trying to learn Java rather than someone who might be looking for an easy way out of doing an assignment.

  • Help Needed For Creating A Game

    Hi, I recently decided to make a MMORPG.A game people will enjoy and have fun, I would of course keep it free sense I have play many games that cost 5-15 dollars a month.I have many creative ideas, but I need someone to show me the ropes and teach me how to use Java and i currently looking for a site to download it at.If anyone would care to teach me how to use this or would like to help me create this game(Medievil type game, Swords armor gold houses dragonslaying and plenty more) post here or send me a pm and we can talk more private.
    I need:
    *A site to download the best possiable Java console
    *Helpful tutorial sites
    *Or any other sites or tips you think i should know.
    Extra Info On Me:
    I dont know if this matters or not probably doesnt but I know how to handle and make a site, ive had some dbz rpgs back in the day(kinda rusty but i can manage).
    Some more recent information:
    I tried game maker and that doesnt seem to helpful.It would only be helpful if I played them 20 bucks which I am not going to do.
    Also i am downloading now JS2E 5.0 for Java.
    I am stilling waiting on some type of input or even a mentor.

    Hi there!
    I'm not really a game programmer.. but here's some links anyway.
    Someone pointed out this tutorial to me, and I think it is worthwhile:
    http://fivedots.coe.psu.ac.th/~ad/jg/
    It has stuff on Java 3D, networking, games for mobile phones/PDAs, isometric tile games, etc. It also has an appendix on loaders and Java Web Start.
    Also, if you want to create 3D games, you might want to check out
    http://www.3dcafe.com/asp/freestuff.asp
    They have free 3D models in various formats.
    For more 3D links and tutorials try:
    http://www.3dlinks.com/
    For a 3D tool, I like Anim8or. That it's free helps a lot ;)
    http://www.anim8or.com/
    And... ms paint!?! You will not be able to draw decent graphics with that. Adobe Photoshop Elements is a nice, low-cost program for 2D images.
    There are lots of sites devoted to java game programming. Try the google. Love the google. Google is your friend. ;)
    :) jen

  • New Game Programmer In Need Of Help Choosing A Laptop!

    hi, im sorry but i really need help with choosing a laptop. not sure where to post this. i just enrolled in game programming. and im currently on the hunt for a laptop that i can use for programming. i know a desktop is better. but sadly i cant carry it to school. after looking at Alienware, Razer, MSI and others. i kinda want to get an MSI laptop. any suggestions? ofcoz not the high end ones. thank you in advance!

    A model with a Steelseries keyboard will by far be the best for you.  What are your requirements - screen size/ storage/CPU/GPU/ screen real estate (4K/3k/1080/)/weight/ material   - those requirements would help to narrow down the choices since there are so many... Also what country are you in and do you prefer to buy from one store or another?

Maybe you are looking for