ActionScript 2.0 :: If / Then Conditional - Simple Quiz?

Mar 13, 2011

trying to make a 3 question quiz on a 300x250 banner in flash.. If 2 of 3 questions are answered 'yes', it's should relay one function (playEndScreenYes()). If 2 of 3 questions are answered 'no', it should relay another function. (playEndScreenNo()). This is clearly a situation calling for the if / then statement. I have it set up, but I can't seem to get it working. I would gladly pay you for an hour of your time today, if you are familiar with if / then conditionals, I think you could look at my code and solve the problem in 10 minutes max. I am a seasoned flash designer and I animate with as2, but I can't wrap my head around this and its making me a little nuts.

some code:
//////////////////////////////////////////
bulletUp1.onRelease = function() {
a = 1;
if (a == 1) {

[code]....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Multiple Choice Questions Quiz - Conditional Answer Checking

Jun 7, 2010

I'm working on a quiz-style piece right now and in short it's several pages of multi choice questions, each rewarding a certain point amount that is added up at the end and given specific results based on the point range scored. (i.e. 10-20 = good, 21-30 = great... etc)

For code I've stopped here:
if (answercheck == 40 - 52){
trace("Feedback: Range 40 - 52");
form.gotoAndStop(3);
form.AnswerTotal.Number = answercheck;
}

Answercheck is the var with the total points accumulated. Form is the mc with the feedback frames based on their point totals. AnswerTotal is the dynamic text box I'm trying to load the exact point total the user acquired into at the end.

View 2 Replies

ActionScript 2.0 :: MX Simple Quiz Game?

Dec 12, 2003

I have developed a simple quiz game, but im having a slight problem with it.I have a variable set to myScore=0

Everytime you get a right answer it should increment 2points But when you get all 3 answers correct i get a final score of 4points

View 2 Replies

ActionScript 2.0 :: AS 2.0 - Simple If/else Input Text Quiz?

Oct 17, 2009

I have a question regarding an if/else statement I am creating for a simple quiz test in Flash ActionScript 2.0. I have the .FLA file attached. main stage I have the following: of "yes" and "no" with keyframes to jump a message to the user about if their answer was correct or notMy button has the following script:

on(release) {
if(vAnswer == "yes"){
gotoAndPlay("yes");
}else{

[code].....

Am I not doing this correct? Everytime I type yes into the input box, it jumps me to my "no" label. I have researched, and I am doing something so simple and wrong, but I can't figure it out for the life of me.

View 14 Replies

ActionScript 2.0 :: Create A Simple Quiz With A Drop Down Menu?

Dec 4, 2009

I have been trying to create a simple quiz with a drop down menu

i have 8 errors and I cant figure out how to correct them so the way this quiz is suppose to work is you select the right answer goes to a congrads page

View 1 Replies

ActionScript 3.0 :: Simple Template That Hooks A Flash Quiz Up To Lms Using Scorm?

Nov 19, 2009

Does anyone have a simple template that hooks a flash quiz up to an lms using scorm?

View 2 Replies

ActionScript 2.0 :: Create A Simple Quiz Which Adds Up Points Depending On The Answer Selected?

Oct 21, 2010

I'm looking to create a simple quiz which adds up points depending on the answer selected.where to read about creating something like this?

View 10 Replies

ActionScript 2.0 :: Removing Correct Answers From Array In Of Random Quiz Questions In Xml Quiz?

Jul 21, 2010

Anyone know where to start thinking about logic for an XML quiz with multiple correct answers, that when the user gets the question right, that question is removed from the random array of questions so we never need to answer it again?

View 0 Replies

Professional :: Simple Sound Player - Visitor To Hear The Sound And Be Able To Apply Simple Controls?

Aug 1, 2011

Flash is not in my toolset, but I am an old Director jock and have spent some hours dipping my head into the Flash manual.  I suppose that makes me a promising beginner-level poster. I'm working in CS5.
 
I need to make a simple Flash-based sound player for a website for a newly-released novel (http://www.bearriverbooks.com/index.html).  I want the user to click on what appears to be an icon (or image), which kicks open a simple controller and starts playing a sound file (a radio interview, which I will probably export using Flash's voice compression).  Nothing fancy.  Just want the visitor to hear the sound and be able to apply simple controls (stop/start/rewind/volume).
 
I can learn ActionScript, I suppose, since I used to dream in Lingo, but my life would be a lot simpler if I could just publish a controller without having to roll my own.  I'd like to think there's a magic button somewhere that can do this, but I haven't found it yet.

View 4 Replies

ActionScript 3.0 :: How To Do A Quiz?

Jan 10, 2010

I have to do a quiz, which will be a random 5 questions from among the 20 I have no idea how to go about doing this, please help.

View 2 Replies

IDE :: Can't Get Results In Quiz

Mar 10, 2007

i made a quiz in flash using actionscript:

At the end I have to sum the answers and show the result to the user but I can't get it.

Here is the code (I'm kind of new to actionscript, sorry if the code it's too long):

Code:
var p1=0;
var p2=0;
var p3=0;

[Code].....

View 5 Replies

IDE :: Quiz With An Action At End?

Mar 10, 2010

I am writing a module and I have a section in this flash file where a quiz comes up and if you don't click on the right answer it tells you to try again. If you click on the right answer it will load the next swf file. But I can't get this last part to work. The quiz is within an xml file.

var current:Number = 0;
var qbox:Sprite = new Sprite;
var quiz:XML;[code]....

So where it says "if(correct) {" on the bottom, I want the file this file to go to the next swf file not say "Correct!".

View 1 Replies

IDE :: How To Conditional Statment

Oct 26, 2009

So I'm not that familiar with using conditional statements yet, and I'm trying to get my head around it. I know what I need it to do, I'm just not sure of the correct syntax.I basically want a statement that says:

if( movieClip1 == frame 10)
{
then play movieClip2

[code].....

View 8 Replies

Create A Personality Quiz?

Mar 21, 2009

How I can make a simple personality quiz in Flash? I've been searching for months for quiz/test codes, tutorials, examples, etc...but I can't find one that would work for a quiz with no "right" or "wrong" answer.

Basically what I want to do is have the user click on statements that they agree with, or answer questions that would lead to one of two possible results.

View 1 Replies

Stopping A Flv Using A Conditional Statement?

May 26, 2009

I have FLV files that continue playing when I leave the frame that they are on. I can stop the playing FLV by putting this code on the following frame:
 
if (demo.playing) {  demo.stop();}
 
Where .demo is the name of the instance of the .flv component.
 
Here is the problem - I have many frames with many flvs, and when I tell flash to stop multiple FLVs, for instance:

if (demo.playing) {  demo.stop();}
if (demo2.playing) {  demo2.stop();}

I get this error: TypeError: Error #1009: Cannot access a property or method of a null object reference
 
As far as I know, flash is telling me that since the instance of "demo2" has not started playing yet (ex. the user only went to the page with the "demo" flv, but not the "demo2" flv yet) that flash has no idea what demo2 is yet. I thought using a conditional statement would remedy this, but I suppose the .swf can't stop playing something it does not yet know exists.

Is there any way I can introduce all of the flv's at the beginning of the file, yet not have them play and not have flash "forget" about them so that I can stop them using the code above? Or is there a way to have the conditional statement not error in the event that the referenced instance has not yet been "introduced"?

I really wish they would have added an "exit frame" command in AS 3.0...

View 1 Replies

ActionScript 3.0 :: Conditional In A Function?

Oct 18, 2009

I'm trying to make a gallery loaded from external files, and I try to not use ready packages or swfs, so I wrote a code. I have many images in a folder and a xmlListfile of this images, and I accomplished to load them one by one, but when the list reach to end in both ways (start or end), Button function for the next images continue to work, I treid to solve to problem with a conditional in function but it didn't help.

The code is:

ActionScript Code:
var i:uint = 0
var imageLoader:Loader;
var xml:XML;

[code]....

View 4 Replies

ActionScript 3.0 :: Using Variable In More Than One Conditional

Apr 14, 2012

It's a little more complex than that, actually. Inside a function, which is called by a Timer Event, I have many conditional statements based on CurrentCount of my Timer. Nested within these conditionals are more conditionals.
<<<I know it's amateur programming, and I'm sure there are much more elegant ways, but I'm just learning (via attempting a difficult challenge).>>>
One way I'm trying to control all these conditionals is via a random number, from 1 to 3. My problem is that after generating the number within one "if (currentCount == )" statement, the variable is no longer available to be used by the next "if (currentCount ==)" statement. Is this some terrible side effect of using the Timer class??

Code:
var timerMain:Timer = new Timer(900, 25)
timerMain.addEventListener(TimerEvent.TIMER, takeTurn);
timerMain.start();
function takeTurn(e:TimerEvent):int {
if (timerMain.currentCount == 4) {
[Code] .....

View 6 Replies

ActionScript 2.0 :: Flash Quiz (form) To CSV Using PHP

Jul 27, 2009

I have a simple quiz (Q and A) to design that contains both input fields as well as dynamic fields which gets a value (text or number) from an onClick action. When i submit the form, using the code from this thread (http://board.flashkit.com/board/show...hreadid=766156), i managed to get the input fields content to get saved on to the CSV file, however the dynamic content doesn't. it only works when i literally type the value in the text field.

View 8 Replies

ActionScript 3.0 :: Creating A Quiz For A2 Module

Mar 3, 2010

I have made a start on my quiz, in order to complete the criterions I have to create a project (a quiz in my case) which uses a variety of methods and tools e.g. drag and drop features, user text input and numeric input etc.I had planned on creating 4 topics and 4 questions in each. Having searched the forum it appears that the common consensus for creating a quiz is to set up your questions in a XML file however I have no idea how to use this or what it is. Moreover from my research I found I appear to be doing things slightly different to other people who are doing or did a quiz. This difference is how the answers are input; I will be user input text fields along, multiply choice buttons etc. I also am placing my questions in different places for different sections and I am also required to use video.This may still be able to be done however I only have 29 days to complete the task and the way I'm planning will be quicker as I understand how it works at least. The first problem I am having is how to code for the input text. I plan on allowing for the user to input a word and then to compare that word against the correct answer. This also brings me onto my second problem. Once a section of questions has been completed I plan on taking the user to a screen which displays how many answers they got correct. This would involve tracking their answers and comparing them to a set of correct answers however I have no idea how to do this. (from what i have learnt recently the use of an array maybe?).

The final problem I am having at the moment is setting up a 'barrier of sorts' In my first question i have set up a mask which applies only to the image I have also placed on the stage. The mask is applied to a circle which can be dragged around displaying small sections of the picture at a time. I wish to stop the circle leaving the picture as it falls under the background once it as left the area of the image. This results it in disappearing. I have no idea how to solve this and I could not find information on it. The solution I think would be to stop the masked circle leaving the area of the picture OR to reset it back to original position if it is released outside the images area.My quiz is far from complete at the moment and I have not yet even finished the frames for each of the questions however these problems are fundamental to the quiz's success and so I felt I needed to confront them now.I can upload what I have done so far and send the link in a pm so you can see what I mean (if it is not already clear)

View 14 Replies

ActionScript 3.0 :: Quiz Is Not Scoring Correctly

Jul 24, 2010

I'm trying to make a quiz with multiple question types (multiple choice, true/false, fill in the blank, drag/drop). The problem I am having is that the questions are not scoring correctly. Here's what happens

[Code]...

View 5 Replies

ActionScript 1/2 :: Quiz - Count Score At The End?

Nov 23, 2010

I have a working quiz but I want to know how to get the score of the number of correct answers the person got but I can't seem to figure out the code for it. This is my code below.

stop();// movie clip waits on buttonsgloss_mc._visible = false;// set the gloss initially to not visiblescore_int = 0;// score on the quiz is initially zero// button functionsq1_btn.onRelease = function() {    scoreQuiz_fnc("1");};q2_btn.onRelease = function() {    scoreQuiz_fnc("2");};q3_btn.onRelease = function() {    scoreQuiz_fnc("3");};q4_btn.onRelease = function() {   

[code]....

View 5 Replies

ActionScript 3.0 :: Build A Basic Quiz?

Nov 26, 2010

I'm trying to build a basic quiz - there are 6 questions and I want it to display a score at the end. Everything works and it shows a value at the end (but always '0'). It's not keeping proper scoring as users go along, it should be adding '1' point for each score, no matter what option is clicked it just traces '0' in the output window. Maybe something to do with the variable or? Kinda new to Flash, the chunk of code I believe to be the issue is below, 
 
import flash.events.MouseEvent;
//varialbe for keeping score
var score:Number = 0;
//event listeners for button clicks, which will adjust the scoring array

[code].....

View 1 Replies

Importing Flash Quiz Into Another Movie

Apr 5, 2010

I am having trouble loading a quiz.swf into another another movie. To generate my quiz I goto
File > New > Templates > Quiz > Quiz_style_1
And in the first frame of the example quiz I add:
stop(); // To prevent playback
this._lockroot = true; // to preserve the heirarchy

Then I publish the quiz as testquizex.swf, and I can test this movie and it works fine by itself. Then in a different movie I start with a blank scene I add a keyframe and I insert
stop();
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.loadMovie("testquizex.swf");

Now the movie imports and loads into the frame and I can navigate through to the first question page, but the quiz doesn't actually work anymore i.e. drop targets dont work and the score won't increase. Is there anything else I have to do to the stock quiz template to make it importable into another project?

View 1 Replies

Java :: Flash - How To Create A Quiz GUI

Aug 17, 2011

I'd like it to display a question on one page, then have a next button which takes the user to another page telling them if that question was correct or not, and if it is correct they can move on to the next question (by clicking another next button) and if they got it wrong, have to go back and answer it again. However I have no clue how to do this! which includes a quiz. Would it be a better idea to create the quiz in Flash or something and then embed it into my Java application? Or just do the whole thing in Java?

View 2 Replies

ActionScript 3.0 :: Quiz With XML Questions And Answers

Nov 18, 2009

I'm trying to create a simple quiz that picks questions from an XML file, then checks the answer the user enters against the answers stored in the same XML file. Every time you press blue_btn it should bring up a new question. Right now I'm stuck -- it shows only the last question in the XML file, when I enter the right answer it tells me it's wrong, and when I press blue_btn again nothing happens.

[Code]....

View 4 Replies

ActionScript 2.0 :: Add Image To Existing Quiz?

Jun 4, 2010

I am using a qui developed as an opensource flash and running a php script to convert this to xml to drage data from database, this works absolutely fine, but I want to load an image into an empty movie clip and not sure where i am going wrong[code]...

View 0 Replies

ActionScript 3.0 :: Building A Quiz That Is Not Stand-Alone

Dec 6, 2010

I've looked online at different quiz-building tutorials, but almost all of them are for stand-alone quizzes. I am adding the quiz as part of a whole interface design. When you click on one of the sign buttons I have on it, a mask will appear and the first four quiz questions will appear. Once those are answered, the next four will appear (probably when they click "next" or something). When I get to the end, I want the results of their quiz to appear.I want to try to use the code my teacher wrote for me so I don't have to build anything extra.if that doesn't work, can I embed a .swf into the file I'm working on? I need this quiz; everything else in my project is done (aside from some tweaking) and I need this finished AND working by Dec. 17.[code]

View 2 Replies

ActionScript 2.0 :: Timer For Quiz Game?

Aug 23, 2005

I have designed a flash-based quiz for a training program. they've requested to have a timer that runs throughout the movie to add pressure and action to the game and also to display their time at the end.

View 2 Replies

ActionScript 2.0 :: Create A Quiz Using Flash?

Jul 19, 2006

Useful link or resource or idea for creating a quiz in flash.My quiz has got these features that has to be mapped with the functionality

a) total of 150 questions divided in 4 modules

b) a time limit of 180 mts

c) option box or radio button for choices

d) mark for review functionality

e) negative marking

f) final review of correct and wrong answers

this is very similar to BITSAT exam conducted in India, by BITS PILANI as a online exam.

View 4 Replies

ActionScript 2.0 :: Randomizing The Quiz Questions?

Oct 18, 2006

I wanted to randomise my quiz questions and to allow all questions to appear but no similar questions should appear twice. I tried to use arrays to do it but I kept having errors.

View 8 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved