thebackalleys

Main => General => Topic started by: GRINACE on April 10, 2009 04:26 PM

Title: need help making a flash game
Post by: GRINACE on April 10, 2009 04:26 PM
I need to make a basic flash game for my Everyday law class. Im trying to make this game like a basic "hers a question and u have 4 choices, one being the anser" thing.

i need someone to just help me program this kinda game cause im putting up 300 questions (cause i have partners in this) so i just need someone o help mek make the buttions and like a score systeme

i need it done by april 20th...
Title: need help making a flash game
Post by: RobHalford on April 10, 2009 04:33 PM
Ho-ly shit.

Um, I might be able to think of something if you give me today.
Title: need help making a flash game
Post by: rtil on April 10, 2009 06:45 PM
picking the right answers would be pretty easy, it'd be a matter of taking the person to a 'right' or 'wrong' frame, as far as adding to a score i don't know anything about how flash deals with variables, but i'm sure it's simple since there are a billion quiz games on newgrounds.
Title: need help making a flash game
Post by: psi43 on April 10, 2009 06:57 PM
I can do that with behaviors
Title: need help making a flash game
Post by: RobHalford on April 10, 2009 07:00 PM
Yeah what you can do is make a button with no text on it that will be labeled "correct", and set it to do "nextFrame();", then make another identical one called "wrong" and put about 3 instances of it on the stage.
Title: need help making a flash game
Post by: ansel on April 10, 2009 08:23 PM
Quote from: Rob HalfordYeah what you can do is make a button with no text on it that will be labeled "correct", and set it to do "nextFrame();", then make another identical one called "wrong" and put about 3 instances of it on the stage.

then just overlay the answers and questions on top of it 300 times

simple
Title: need help making a flash game
Post by: Thor on April 12, 2009 07:47 AM
I can help out if you're doing AS2 (as3 is foreign to me). This all goes on the root/stage, by the way

for the scores, regardless of version, you're going to need to declare a variable for the number correct and another to store the percentage correct, so something like

var numCorrect:Number = 0;
var percent:Number = 0;

for each button, one of which is going to add 1 to numCorrect (instance name will be correctButton):

correctButton.onRelease = function(){
numCorrect++;
nextFrame();
}

on the last frame, this SHOULD help add up the scores:

onLoad = function(){
percent = numCorrect / 300 //3000 or however many questions you need
}

and somewhere in there, rig up a dynamic textbox to display "percent"

If this doesn't make sense it's because I'm completely incoherent right now.
Title: need help making a flash game
Post by: GRINACE on April 14, 2009 02:07 AM
ive never touched the Actionscript portion of flash so idk what ur showing me lol.
Title: need help making a flash game
Post by: rtil on April 14, 2009 06:55 AM
Quote from: GRINACEive never touched the Actionscript portion of flash so idk what ur showing me lol.

i'll break down the code thor posted for you here. i'm going to assume you know how to give a symbol an instance name and put actionscript on a timeline (if you don't, god help you)

Quote from: Thorvar numCorrect:Number = 0;
var percent:Number = 0;
two variables: one for the # correct, and one for the percentage correct. both defined as 0 to start.

Quote
correctButton.onRelease = function(){
numCorrect++;
nextFrame();
}
a function that is called when the correct answer is pressed. it adds 1 to the user's score and goes to the next frame.

Quote
onLoad = function(){
percent = numCorrect / 300 //3000 or however many questions you need
}
this actionscript is put on the last frame. onLoad tells it to load the function when the frame is reached. it divides the number correct by the number of questions that are in your quiz (you define that).

Quoteand somewhere in there, rig up a dynamic textbox to display "percent"
i don't remember how to do this but if you make a dynamic textbox with an instance name percentageCorrect for example, there is an easy way to put the percentage # from variable percent into this box


Title: need help making a flash game
Post by: shura on April 14, 2009 07:18 AM
wow AS3 kinda reminds me of java.. was that done on purpose?
Title: need help making a flash game
Post by: rtil on April 14, 2009 08:28 AM
most programming languages look pretty similar. java and actionscript both take most of their cues from C
Title: need help making a flash game
Post by: RobHalford on April 14, 2009 02:51 PM
Quote from: Sashurawow AS3 kinda reminds me of java.. was that done on purpose?

Yes. They rebuilt it with JS in mind.
Title: need help making a flash game
Post by: f0d on April 15, 2009 06:53 PM
Quote from: GRINACEive never touched the Actionscript portion of flash
start now
Title: need help making a flash game
Post by: GRINACE on April 15, 2009 11:58 PM
Imma bout to i only have 5 days left and im nervous about statrting this plus i have alot of schol work at te moment.
Title: need help making a flash game
Post by: GRINACE on April 21, 2009 02:07 AM
Uhh guyz im still lost here and this is due of friday. Need some 1 on 1 help her via Aim Msn or skype!
Title: need help making a flash game
Post by: texas on April 21, 2009 02:09 AM
thats what you get for procrastinating !
Title: need help making a flash game
Post by: rtil on April 21, 2009 02:18 AM
i'm surprised you've been unable to figure out how to do this on your own. it's very simple actionscript - have you even tried?
Title: need help making a flash game
Post by: Wasim on April 21, 2009 04:43 AM
last minute projects... i hate them so much
Title: need help making a flash game
Post by: mishkamash on April 21, 2009 01:27 PM
google it goddamnit