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


Similar Posts:


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

Actionscript 3.0 :: Randomizing XML Questions Randomly And Limiting Display?

May 17, 2010

I have an Flash CS4 application which pulls in data (questions) via XML and randomizes them. Right now if there is 50 questions in the XML file, 50 questions are displayed and randomized in the application. I am trying to figure out how to limit the randomizing pool so that only 35 questions display(even when the XML file has 50 questions) or something like that. My current code which brings in the file and randomizes is below. The code is written in AS3, by someone else. this part of the code pulls in the XML data and randomizes.

Code: Select allpackage  exam {
import flash.net.* //to create URLRequest and load XML  file
import flash.events.* //for Load events

[code]....

View 7 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 3.0 :: Dynamic 'quiz' With Questions Being Passed Through Flashvars?

Oct 13, 2011

I want one question to be displayed (just text) and then the user will type in their answer (just text) then they should press a button to move onto the next question to do the same.  The number of questions is not set and depends on how many questions the asker has created, these are passed through flashvars from the backend database.
 
So can I just do this in the one frame with a loop or something going through each param in flashvar ?  Or would a better way be reload the page (it's going on a website) after each question answered passing the flash a single question.

View 3 Replies

Creating Quiz In Flash With Questions Passed Through Flashvars

Oct 13, 2011

I am getting questions from the database (just text) and then passing them to flash via flash vars.I want one question to be displayed then the user will answer (text) and click a button and then the next question will be displayed for them to answer and so on.I am not hoping for overly specific advice but as I am very new to flash/actionscript am just looking for broad advice (or links ?) on how to approach this. Can I do it all from one frame just using actionscript?I think what I am really after (assuming I am not way off track) is if all the questions should be handled at once which I guess will require some kind of loop that listens for some buttonclick event to move to the next question ..... or be 'reloading' the flash movie and dealing with only 1 question at a time.

View 2 Replies

ActionScript 3.0 :: Load Random Quiz Questions From Arrays?

Nov 7, 2009

I am fairly new to AS3 so I am having a go at creating my own game of Who Wants to be a Millionaire?, thought a quiz game of sorts may be simplish. Right now, I am having trouble working out how to load shuffled questions. This is the code I have so far[code]...

View 1 Replies

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

Professional :: Interactive Quiz - Three Questions That The User Must Answer With Three Possible Answers In Frames 3,4 And 5?

Feb 10, 2010

For my project i am creating a quiz on the Romans. There are only three questions that the user must answer with three possible answers in frames 3,4 and 5.I want to know the code that would help me to allow a Jpeg (an evaluation of the answer given on each frame) to be placed on frame 6 ready for the user to receive feedback for each answer they have given. So when the user selects an answer, the corresponding jpeg to that answer is placed ready on frame 6 for their arrival after they have answered the third question.

View 1 Replies

Xml :: Import Questions To Xul / Flex?

Jan 23, 2011

I need too create quiz app using xml for database for questions and xul or flax for interface, quiz should have 3 types of questions : single answer (radio), multianswer (checkbox) and open (textfield). I really don't know how to import questions from xml, to xul/flex Also i need to save the answers to txt/xml file The xml database is something like this

[Code]...

View 3 Replies

ActionScript 2.0 :: Randomizing The XML Slideshow?

Dec 28, 2008

I have an xml flash slide show that works great but i would really like it to randomly select the images out of the xml so that every time it is seen it is showing a different cycle of images. I'm not by any means an ActionScript expert far from it actually, but i understand a bit of it (not enough to write my own code yet).here is the code im using:

import mx.transitions.Tween;
import mx.transitions.easing.*;
var myShowXML = new XML();
myShowXML.ignoreWhite = true;

[code]....

Also I'm not using the text version of this were it gives a title of the image that is displayed but every time i think i have removed it correctly i screw the the whole thing up. right now i just have the title area in my xml blank which works but i guess its not the cleanest code right.

View 9 Replies

ActionScript 2.0 :: Randomizing The XML Gallery?

Jul 11, 2006

I used the tutorial for making a xml gallery and changed it up a bit to make a banner ad gallery from an xml file. This makes life easier for my non flash designers to just update the xml file when new ads come out. I would now like to make it randomly select the first image.The only idea I had was to change the p = 0; part to p = Math.floor(Math.random() * total); That didn't work.There is some additional code in there for a coldfusion click tracker and some to build the url string for the coldfusion page

// Load XML, define arrays, and initiate loading of first image
function loadXML(loaded) {
if (loaded) {

[code]....

View 5 Replies

IDE :: Randomizing Pictures In XML Slideshow

May 1, 2009

I've got an xml slideshow playing on my home page and I need to have the pictures randomized. You can see the flash in action at [URL]. Here is the code that I am using now.

delay = 10000;
// function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
[Code] .....

View 8 Replies

ActionScript 2.0 :: Randomizing An XML Array?

Feb 16, 2005

Basically, it loads and parses an external XML file. I have it set to just step through the file but I'd like it to randomly display the images referenced by the XML. The script works like this, but I can't seem to figure out how to get the XMl into an array and then have the function read it correctly. It seems to me that the call:

picture.loadMovie(image[p], 1);

with p being changed somehow to a call to myArray should work, but it doesn't. What am I doing wrong?

this creates the load XML function and counts the children to an array
function loadXML(loaded) {
if (loaded) {[code]....

so the XML needs to loaded into the array somehow. Here's the array with a bunch of numbers instead of the XML info.

myArray=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15];
myArray.Shuffle();

View 2 Replies

How To Randomly Spawn 3 Out Of 10 Questions From Library

Feb 12, 2010

I'm really new at flash and I'm having some trouble with a textbook assignment. Before I explain my problem here is the code:

Code:
stop();
var defValue:Number = 1;
stage.addEventListener(Event.ENTER_FRAME, vetIkke);
function vetIkke(e:Event
[Code] .....

I was doing some assignments in my as3 textbook when I ran into a bit of trouble. I'm trying to make a flash that picks 3 random questions out of a total of 10 and displays them on screen. I made each of the questions movieclips and assigned them all a class (question1 - 10) through Linkage. So the variable "randomQ" is the name of the class of a random question, but how do I get flash to understand that? And how do I spawn that question as a movieclip on stage?

Code:
var Question:MovieClip = new randomQ();
I've tried various alterations but can't seem to find the right one. It's possible I've yet to learn the necessary knowledge in order to make this flash.

View 1 Replies

ActionScript 3.0 :: Import Questions Into Flash CS3

Apr 2, 2010

I'm making a sort of Quiz in Flash with AS3. I know its possible to import the questions + answers with Notepad, XML or even PHP. But I dont know where to start. Can somebody help me out? I allready searched for good tutorials that can help me out but I cant find something usefull.

View 4 Replies

ActionScript 2.0 :: Randomizing Image And URL Data From XML

Feb 19, 2009

I am trying to build a simple image scroller in a way that it creates 2 arrays from 2 xml attributes. I got that working, but what I want to do next is randomize the order of the images and while making sure it they retain their specific urls. Then I want the scroller to loop those images in that random order infintely.

So far here is ActionScript Code:
stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
// change the values to alter the spacing and scroll speed
scrollSpeed = 1;
picSpacing = 0;
picWidth = 116;
[Code] .....

View 7 Replies

ActionScript 2.0 :: Randomizing Movie Clips?

Oct 18, 2010

I have a file with several movie clips and I want every time swf loads the different movie clips plays.

View 2 Replies

ActionScript 3.0 :: Randomizing A Thumbs Grid

Mar 5, 2011

I'm trying to build an application that displays randomly thumbnails in a grid, but having problems with the random part. I'm displaying the thumbs in grid like this:

[Code]....

View 4 Replies

Actionscript 3.0 :: Randomizing Thumbs In A Grid?

Mar 5, 2011

I'm trying to build an application that displays randomly thumbnails in a grid, but having problems with the random part.I'm displaying the thumbs in grid like this:Code: Select all//building a thumbnail container for each one of the projects from the library

var thumbContainerMisc_mc:ThumbContainer = new ThumbContainer();
thumbContainerMisc_mc.x = (200+1) * x_counterMisc; //setting the thumbnail x
thumbContainerMisc_mc.y = (200+1) * y_counterMisc; //setting the thumbnail y

[code]....

View 1 Replies

ActionScript 2.0 :: Randomizing Image And Url Data From Xml?

Feb 19, 2009

I am trying to build a simple image scroller in a way that it creates 2 arrays from 2 xml attributes. I got that working, but what I want to do next is randomize the order of the images and while making sure it they retain their specific urls. Then I want the scroller to loop those images in that random order infintely. So far here is my code:

Code:

stop();
import mx.transitions.Tween;
import mx.transitions.easing.*;
// change the values to alter the spacing and scroll speed

[code].....

View 1 Replies

ActionScript 2.0 :: Randomizing Location Of Movieclips?

Mar 4, 2009

I have 7 movieclips that form a line down the stage like so:

Movieclip 1
Movieclip 2
Movieclip 3

I need it so that when a button is pressed is randomizes the order in which they are shown for example it could be:

Movieclip 2
Movieclip 3
Movieclip 1

View 4 Replies

ActionScript 2.0 :: Shuffle Questions Rather Than Use Random?

Aug 13, 2004

I have made a quiz which has 20 questions. 15 questions are asked at random. However, being at random some questions are repeated. How do I shuffle questions rather than use random?

View 4 Replies

ActionScript 2.0 :: Randomizing CSS Based On Array Value?

Sep 20, 2004

So I figured that the last idea I had would not work, but I realized that if I attached each seperate background image from an array to a css element that, that would indeed work.

View 1 Replies

Multiple Choice Game Containing Questions And The Answers?

Apr 22, 2009

I have a project that i want to make which is a Multiple choice game containing questions and the answers is four pictures when you click on the right answer you move to next question when your are wrong a wrong sign appears i have zero knowladge about flash but i thought this is similar to Geo Challenge in facebook ,,Right ?? what software to download ? any tutorials online ?

View 4 Replies

ActionScript 3.0 :: Code Structure Questions For Delegate And Others?

Dec 4, 2009

i instantiate a sprite-class "panel" from my main class. then i call a function "show chooser" inside "panel" which instatiates a sprite class "chooser" with some buttons. now when one of the buttons is pressed i need to call a function inside "panel" which removes the "chooser" sprite/class and which calls a function "onChosen" in the main class.

what is the correct/best way to reference these functions so that they can be called from within the panel and/or chooser classes. i am still too much in the old thinking that a function belongs to a movieclip and can functions with _parent. i need to learn the proper way now.

View 2 Replies

ActionScript 3.0 :: Randomizing Symbol Movement Within Range

Apr 7, 2010

Basically, I've got a small space shooter game and the idea is to have the enemies start moving at the top of the screen and head towards the player, while growing in scale, and moving at an angle.(To give the sort of perspective/distance effect). Right now, I'm able to get the enemies to move at one angle only. How would I get them to move on X at a certain range?

This is the code affecting movement/Scale
for( i = 0; i < enemyShip.length; i++ ){
enemyShip[i].y += 10;
enemyShip[i].x += 5;
enemyShip[i].scaleX += 0.03;
enemyShip[i].scaleY += 0.03;
}
The pic above basically shows what I mean by the perspective look. I need to blocks to move towards the player at various X ranges within those lines, but I don't want them to zigzag while moving. I know it has to do with Math.Random.

View 2 Replies

ActionScript 3.0 :: Make Equal Opportunity Randomizing?

Aug 30, 2010

A slideshow containing advertisements, randomized in a way that each ad gets the same chance at being the first one to show when the page gets opened. Or rather, not randomizing, but alternating between about 25 different ads, perhaps even more

View 5 Replies

ActionScript 3.0 :: Randomizing Appearance Of MovieClips - X And Y Positions

Jan 9, 2012

I'm having an issue using randomizing the appearance of movie clips using Math.random. I have a movie clip in the library, which is 85 frames long but it begins and ends with 15 blank key frames. In other words, it has 2 layers, one for action script and one for graphics which are movie clips too, the AS layer is 85 frames long while the art layer is shorter and begins on frame 16.

I began by putting the movie clip on the stage, without any code on the main timeline, with some code on the movie clip's timeline -
this.x = Math.random()*stage.stageWidth;
this.y = Math.random()*stage.stageHeight;

In this case, tested the movie, the swf played just what I wanted, the movie clip "appears" randomely on the stage, plays, disappears, and reappears, and so on and so forth.

I then gave the movie clip on the stage an instance name of b_mc, removed the code in its timeline, and put it on the main timeline, as such -
b_mc.x = Math.random()*stage.stageWidth;
b_mc.y = Math.random()*stage.stageHeight;

In this case, the movie clip does NOT appear randomly on the stage when the swf is tested, rather, it appears at the same position, appearing and disappearing over and over as planned, but in the same place - NOT as planned.

View 7 Replies

ActionScript 2.0 :: Randomizing Animation Starting Point?

Sep 3, 2009

I'm working on a services module (slideshow for lack of a better term) for an accounting firms website - site is still under construction at On the home page, far right hand column a grey box with a service icon and user controls progresses thru the five services until the user advances the slide manually.I need to randomize the starting point of the slide show using one of the five services. To complicate the matter further I need to weight them so some services show up more often than others. But randomizing with equal weight would at least be a start.

View 1 Replies







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