Scoring in a trivia game

I'm putting together a flash trivia game. I want the score to
be revealed only after all the questions have been answered.
Something like this:
1-5 right, try again
10+ right, good job
15+ you're getting better
20+ you're a master
So, I need some script to remember the score, and keep it
hidden, and count the right answers and reveal them at the end.
Can someone help me with this?
I'm kinda new to action scripting

To be able to play existing sounds fragments and play generated tones you can use the Mobile Media API (MMAPI). Check whether your target JVM implementation supports MMAPI.
To be able to play a certain tone you could use something like this:
(check the API specification of the 'javax.microedition.media' package)
Manager.playTone(int note, int duration, int volume)
That should do the trick.
Jasper

Similar Messages

  • Trivia Game: Error while testing CS3 app in CS4

    I have been attempting to test an exercise file for a Trivia
    Game written in AS3 using the Flash CS3 IDE.
    Unfotunately I have been receiving two errors each time its
    run while using Flash Professional CS4.:
    <ol>
    <li><strong> 1023: Incompatible override.
    </strong></li>
    <li><strong> 1021: Duplicate function
    definition.</strong></li>
    </ol>
    each of these errors occur on the same line:
    <ul>
    <li> <strong>public function showScore()
    {</strong></li>
    </ul>
    Can anyone help? The code and every

    It appears that showScore is some sort of reserved word in
    CS4 or one of the CS4 libraries. Just change every showScore in the
    code to something else like showGameScore and it should
    work.

  • Trivia game that does NOT require data

    looking for a trivia game that does not require an Internet connection. We are going camping and like to play a trivia game around the camp fire, but there is no cell service or data or wifi. We have used Mr Trivia for the last couple years but have ran out of new questions. Looking for something simular in function. Most of what I've tryed does not funtion without running data.
    ipad, iphone or pod (mutiple generations)
    thanks

    dalewren wrote:
    Are there any carriers that allow this?
    Not that I'm aware of. In fact, many carriers, if they detect an iPhone on their network without a data plan, will either bill you for such or cancel your service.

  • Simple Trivia game

    I am attempting to design a very simple trivia game. It needs to include if and for statements. Can anyone link me to a place they know of that shows me how?

    pastramigod wrote:
    More of how to incorporate it into a trivia game.There's no specific instructions for this that I know of. You're just going to have to play and experiment with your code. In fact, I recommend that you play and experiment with your code, because even if you don't get a decent game running, you are sure to learn a lot. Please come back with your code samples if you run into problems.

  • Music trivia game error message

    i'm having problems accessing my music trivia game. it worked when i got the ipod last week, but now that i've used it a bit, whenever i go to play my music trivia, "no songs found, error" appears on my screen. does anyone know why? is there some way i can fix it? i have only deleted a couple of songs and added a whole album (18 songs) but that's the extent of the changes i've made with the nano. any help would be appreciated
    thanks
    PC   Windows XP   Sony

    If I reset the iPod, that means all the songs will be deleted too, right? I'm still a little unclear with all these 5 R's thrown into the mix every which way!
    Thanks

  • Basic Trivia Game

    I am looking to make a trivia game as a special feature on my dvd for my kids...1 trivia game per each kid 10 questions each...After each question a track is going to with them saying YAY or NO and then it proceeds to the next question....The questions do not need to be in random order....infact id prefer they are not...also id like at the end of the quiz for a menu to say how many they got right out of how many....i have developed a way to do this however it involves using over a hundred menu's and tracks with different end jumps...i do not know anyhting about scripting but i am willing to use it if someone lays it out for me....im using DVDSP4.....and ideas?

    Do a quick search using the "more options" and search last year, just put the word "trivia" in the DVD SP forum and there are many threads. I think some of them had some details and point to projects files

  • Need a little help with a trivia game

    Hey guys I was wondering if I could get some help. I'm taking a class at school for java programming and its my first class. And I have to do a final assignment, which is to make a java trivia game. I have all the parts coded already pretty sure. Now be forewarned that I'm not "that" great at programming.
    But the part that I'm stuck on and cant really get any help on is this: For the game I need to have a file with all the questions and answers, which is created already and works. The file writer has the question, choice 1, choice 2, choice 3, choice 4 and the answer written to it, in that order. We needed to implement a GUI and I coded that as a message label on top where the question will go, in the middle 4 radio buttons where the choices to the answer will go and on the bottom a next question, ok and quit button.
    My question is this: How do I pull the information from the file that was written to appear in the GUI, such as the question and the choices for the answers for the question? ANY and ALL help would be appreciated

    Read the information using a BufferedReader wrapped around a FileReader. Change your GUI using setText on the component you want to display the text.
    Edit: An example that does both things
    import java.io.*;
    import javax.swing.*;
    public class FileAndSwing {
       public static void main(String[] args) throws Exception {
          BufferedReader reader = new BufferedReader(
                new FileReader("FileAndSwing.java"));
          StringBuilder builder = new StringBuilder();
          for ( String line = null; (line = reader.readLine()) != null; ) {
             builder.append(line).append("\n");
          JFrame frame = new JFrame("FileAndSwing.java");
          frame.setSize(500, 500);
          JTextArea field = new JTextArea();
          frame.add(field);
          field.setText(builder.toString());
          frame.setVisible(true);
    }This is also kind of a Quine :-).
    Edited by: endasil on 15-Dec-2009 4:00 PM

  • Trivia game app with real money

    hi,
    i`m working on a trivia game app that involves a tournament with money prizes.
    i haven`t been able to understand what`s allowed to do under the apple guidlines concerning possible means of payment for credits to the tournament.
    1 - can i use In App Purchase to allow the players to buy credits for the tournament where they can win money?
    2 - can i have a native page allowing them to buy credits to the tournament using credit card or paypal? if not can i open a browser asking them for their credit card\paypal?
    Thanks!
    Ido

    Because the game is only 99 cents? It shouldn't matter, itunes is getting money either way, I already paid for the card and redeemed it to my account. How ridiculous.

  • Making a trivia game.

    I was looking at making a sports trivia java game. I want to make it so it starts with 20 seconds and goes down and the faster you answer it the seconds left equals how many points you get. Does anyone have any left over code or a similar style of game? I won't be putting it online or anything I am just making it for a friend and thats it so no real code stealing and making profit or anything. So can you please help me?
    Thanks

    SomethingCool wrote:
    I have all the questions and everything done. I just need help getting started on the actual game.
    Thanks"Help getting started" is very different from "a tutorial that has exactly what to do". So which do you want? The code so you can re-type it yourself? Or the basic concepts and techniques so you can actually create code yourself?

  • CS4 coding - trivia game

    I'm coding a question-and-answer type of game for a class of mine. Even thought I have CS4, I'm using ActionScript 2.0. The game has five categories. Each category has a button in Scene II that takes the player to another scene (Button A to Scene III, Button B to to Scene IV, etc). Once you get to the scene, a box (made a button so you can click it) with a question fades in. When you click it, the question fades out and the answer fades in. Clicking it again loops back to the beginning of the fading tween.
    What I need help with is finding a way to make it so each time the player clicks a category, they'll be taken to the next question in line. So the first time the player clicks Category A, they'll be taken to Question/Answer 1A. The second time they click Category A, they'll be taken to Question/Answer 2A. And so on and so forth.
    Also, is there a way to do this simply without having to make every individual Question/Answer button? I have over 100 questions and I don't know how well my program will be functioning with that many things to load.

    You will have to rethink your approach in order to simplify that game.  Using scenes the way you are will be hard to manage, and using scenes with navigation is not a reliable design approach when it comes to Flash, they just don't work reliably.  You can easly design this whole thing is just one frame if the timeline if you think thru it.
    Your game design should not be based on creating individual questions/answers movieclips that you have to manage on the timeline.  What you should think about is how to go about making it so that your questions and answers are just data that you store in variables (like an array).  You just pull the data sequentially from the array as you progress thru the game.  Later on, you could have the questions/arrays fed into the file dynamically using an xml file or a database.
    The vehicle for presenting the question / answer sets could be designed as just one movieclip with a dynamic textfield that you assign the text for each new question /  answer to using code.  Try to think how to design a movieclip that does all of what you described as far as the buttons and whatnot that you can use over and over again, just the one instance of it.  You go thru a question / answer set , click a button, and that same movieclip is re-used, where the next question / answer replace the last ones.
    It might seem like a lotta work, even just learning how to do it, but I'd be willing to bet it will take you alot less time to do than creating maybe 10 or 20 questions the way you are proceeding now.

  • Recording from yesterday's flash trivia game show event

    Hey folks, I don't usually do this, but I just wanted to let everyone know we had a really great time yesterday filming a game show edition of On the Air about flash storage. The guests were all really knowledgeable and entertaining, and the crowd seemed to really enjoy playing along. 
    Here's the link to the recording if you're interested in checking it out. 
    http://community.spiceworks.com/topic/1108755-on-the-air-game-show-you-don-t-know-jack-about-flash-s...
    This topic first appeared in the Spiceworks Community

    I think I get it now. The hype. Not the scary hype. Not the news articles that say attendees should only use pencil and paper or “burner phones.” What is this, The Wire? I looked all over for Marlo and Stringer and Fuzzy Dunlop and didn’t see them anywhere.What I did see was a killer keynote that made the kind of sense we rarely see in mass media. I saw technical presentations that simultaneously put my mind at ease and made me wary of what is inevitably around the corner. I saw a couple of sessions that were pretty dull but also packed with the kind of important information that will change my behavior once I get back out in The World (especiallyhow I treat my Mac… you know… because nobody hacks Macs, right?)The amazing part is that all of the diverse ideas I was exposed to today seemed to magically coalesce into a unified, albeit...

  • Trivia Game

    Delete...

    It appears that showScore is some sort of reserved word in
    CS4 or one of the CS4 libraries. Just change every showScore in the
    code to something else like showGameScore and it should
    work.

  • Help computing scores on Trivia game

    I need to compute scores and would also like to notify users on their progress
    There are 5 questions , 20pts each = 100pts;
    I built two arrays (rightAnswers will compute scores and completeAnswers will give them their progress :
    var rightAnswers:Array = new Array(next1_mc, next2_mc, next3_mc, next4_mc, next5_mc);
    var completeAnswers:Array = new Array(submit_btn, submit2_btn, submit3_btn, submit4_btn, submit5_btn);
    I know I need to set them both at 0 something like:
    for (var i:int=0; i<=4;i++)
    so I think the  function for score is
    function computeScore() {
         for(var i:int = 0; i < 4; i++) {
        var rightAnswer:int = rightAnswers[0] + rightAnswers[1] + rightAnswers[2] + rightAnswers[3]+ rightAnswers[4];
       scorefinal_txt.text="Your score is " + int((rightAnswers[0] + rightAnswers[1] + rightAnswers[2] + rightAnswers[3]+ rightAnswers[4]) * 20);
    so I think the function for the FIRST progress_txt (twhich their will be 5 for each question completed)  <<clueless on this one
    function computeProgress() {
                for(var i:int = 0; i < 4; i++) {
                var completeAnswers:Array = new Array(submit_btn, submit2_btn, submit3_btn, submit4_btn, submit5_btn);
                progress_txt.text = "You've completed " +int(( correctAnswers[0] + correctAnswers[1] + correctAnswers[2]  + correctAnswers[3]  +
                correctAnswers[4]) - -i) + " questions out of 5";
    can someone push me in the right direction or a site to help research

    if you just want to track score and current question, you don't need arrays.  just use a variable to store their score (initialized at 0) and a variable to store the current question (initialized at 1 when the question is displayed).
    after they answer a question either increment the score variable or not.
    when they advance to the next question, increment the current question variable.

  • Question on designing a trivia game with Flash

    Hello everyone! I am new to Flash and I was wondering, if sites like http://www.conquiztador.de/ are made entirely in Flash or is there more to it?
    Thank you for your answers.

    Simple answer: yes. More complicated answer: sort of. The quiz that makes up most of the opening page is done in Flash. There is some sort of back end that keeps track of the users' scores. This was done using something else, javascript, Perl, PHP, or a combination of those and maybe something else. Most of the other sections of that site are not done in Flash.

  • Granularity regarding scoring

    I am trying to find out how granular the scoring result capabilities are within Captivate 4. I do not want simply pass/fail or complete/incomplete. I would like to be able to pass the specific questions answered and the results of each. I would also like to know if we can capture how many attempts took place on any given question. Is this granularity possible out of the box or maybe there is additional programming that could make this need a reality. I am not a programmer and would therefore love to know this is possible without much difficulty. Anyone have any experience?????

    I appreciate the swift response, I have several queries:
    1.) My girlfriend�s project is a text based game as previously mentioned, one which features multiple rooms. Upon entering certain rooms, the player loses a life, how exactly would such a thing be implemented? Also, what classes would be involved? (There are multiple including Game; Room, Score, etc�)
    2.) Would it be at all possible to associate the above code with the game and it�s classes, since implementation is proving troublesome?
    3.) Is it possible to implement a points system as well as that of lives? For example, the player would receive points upon entering certain rooms, but would lose them upon entering others.
    To clarify the above somewhat, we�re basically looking to introduce a scoring system into the game. We�re unsure how to implement different aspects including the player�s lives, the rooms which result in the loss or gain of points and lives etc�
    Any help would be much appreciated.

Maybe you are looking for

  • Laptop not able to get the wireless signal from the lightweightAP

    Brief idea of the installation. One WLC 5500 active -> second not yet installed 36 AP active, at the end they will be 45 (9 not installed) Everything on the configuration look active and the light AP are registred to th e WLC.  RF Channel definition

  • Error updating Reader to 8.1.6

    Is anyone else getting a version not found error while upgrading Adobe Reader 8.1.5 to 8.1.6? I've also tried updating 8.1.4 from an administrative installation point but I get the same error. Below is the log from msiexec: MSI (c) (B8:14) [17:27:42:

  • CS3 / javascript / Creating anchor frame and placing xml element

    Hi All, I have a problem with creating anchor frame, that is Actually i have created anchor frame, but it is not allowing to place the xml element, it shows "inline frame xml elements not allowed" some thing like this. I have handled anchor frame typ

  • Spell Checker in Projector

    Hi all, I've built an application and want to include a spellcheck function - If I have it as a web page based app, then no problem - I've got a cracking spellchecker application that works a treat. BUT because of the nightmare of deploying a web bas

  • Flexiprovider, Elliptic curves

    Hi, has anyone used Flexi's class Point and PointGFP? Their arithmetic operations in particular and initializing a specific curve for them. Thanks! anyone? (: Edited by: sk16 on Apr 17, 2010 6:33 PM