Monday, January 30, 2012

Trying to make a Jeopardy Game...?

I'm using Macromedia/Adobe Flash, with actionscripting.



Can someone please tell me, in EXTREME lamen's terms:



(1) How I can get Flash to keep track of which question box was selected and by proxy, know which question to ask



(2) How I can get Flash to read what was entered in an input text field (i.e, the answer is "Tomatoe" and the person types "Ravioli" into the text field)



(3) How to establish a scoring system based on the two questions above. Like, if the person clicks a question box, I want the system to know how much that box is worth (points-wise) and if a person answer it correctly, I'd like to know how to trac, how many points they get.



I DO NOT WANT YOU TO DO THE WOK FOR ME, I JUST NEED TO KNOW SCRIPTING METHODS AND MAYBE A FEW LINES OF CODING TO UNDERSTAND WHAT DIRECTION I CAN TAKE.



ANY HELP WOULD BE GREAT



and yes i HAVE looked online at flash help sites already.Trying to make a Jeopardy Game...?
1. Use action script to read through a list of questions via XML.



Then create a second file or store it in variables to match up questions answered vs questions left.



2. Same theory but this time you need to eval the input boxes:



function checkText():Void{

//Extract the number from the input text field in focus

focus = Selection.getFocus();

myTextNumber = focus.substr(15);



//Compare the original text with the input text

origMyText = myArray[myTextNumber];

trace(origMyText); // returns the correct string

newMyArray = ["myInput"+myTextNumber];

trace(newMyArray); // returns myInput0

newMyText = newMyArray.text;

trace(newMyText); // returns undefined

if(newMyText == origMyText){

trace(newMyText+" = "+origMyText);

}

};





3. Create a point structure questions worth X points if XML document says 5 right then 5 * X points to give final score.

No comments:

Post a Comment