ActionScript 2.0 :: Creating A Flash Quiz Using External XML Data
Jan 5, 2005
Im creating a Flash quiz using external XML data. For example, 5 items and the user has to select the correct ones. The answer is inside the XML, and looks like this:
HTML Code:
[Code]...
View 2 Replies
Similar Posts:
Jul 19, 2009
I am still using flash 6.0, the version the school gave me, anyway first of all are there any updates available somewhere? I'm still with the original 6.0000000 version. I am creating a flash quiz using the templates available, it's really easy and everything is going well. However, is there a way to redirect the user (getURL) if he has a percentage of say, 80% or higher?
View 16 Replies
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
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
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; var xloader:URLLoader = new URLLoader();
qbox.x = 10; qbox.y = 125; this.addChild(qbox);
[Code] .....
View 4 Replies
Mar 11, 2010
I know there are quite a few examples of drag and drop quizzes but what I need is a tad bit different. I will have a list of answers that a user must put in the correct order in some slots. When the user drags a particular answer onto a slot even if it isn't exactly on top but nearby, the target will sense this and snap the answer into the slot. The user can change the order at anytime.
[URL]
Ok at this site it has exactly the snap motion to the target that I wanted. Although I don't need the feature where the movieclip goes back to it's original location if it is not placed in the correct target. In fact I can't have that because the quiz results will tell the user after they finish putting their answers in the order they believe to be correct, whether or not their order of answers was correct after they click the submit button.
View 1 Replies
Aug 8, 2010
I had an existing client ask me about the possibility of building an online quiz. I am fairly adept at working "inside" Flash, but always run into problems when trying to export data "from" Flash anywhere else. I am also trying to figure out if Flash is the best application to build this quiz (I see other possible apps like Captivate, but don't know if they are necessary for what I am trying to do).
What I need to do:
I need to create a Login screen to attach the final text score to an individual.
Create (50) separate screens for 50 questions with multiple answers for each (simple enough) with submit buttons once the answer(s) are chosen.
Each time an answer is submitted it has a certain "weight" toward the total score (which I am guessing that I could track into a variable inside Flash?) When the test is complete all I need to do is send that Person's Name/Total Score to a database. Is this something best accomplished using Flash?
View 3 Replies
Sep 15, 2009
1. How could I make it where some images/text in a flash file is taken from another outside file. For example lets say I have a image and text that would need to change constantly. The image could probably be done by using a url and changing the image set to that url, but I would rather have it search for a images file name on my computer. For the text is there a way I could use a text document, and have it set up to take the text in that document and display it.
2. How can I make it so when I click a link to an outside url it doesn't confirm that I want to visit it.
View 2 Replies
Nov 22, 2006
At my last job I was teamed with a developer to make this stuff work, now I'm on my own and have been tasked with creating an e-learning suite that can track quiz data. Flash Templates will not work as there is some deeper interactivity we're creating. I've tried deconstructing the quiz templates, but that has proved very hard. The actionscript manuals have, as usual, proved not so useful; My personal design book library goes only to 5. Is there somewhere I can go, or a book you could recommend to either learn the easiest way to script data tracking for a (very) custom quiz, or find a few source files I can tear apart and reconstruct.
View 3 Replies
Jan 19, 2010
I am trying to import data from an xml file and use it in a quiz program. currently the quiz program uses an array like so:\
wordList = ("John,Susan,Mary,Margaret,James,Sam,Ursula,Nelly, Peter").split(",");
My xml file is in the form: <list><word>John</word><word>Susan</word><word>Margaret</word><word>James</word><word>Sam</word><word>Ursula</word><word>Nelly</word><word>Peter</word>
[code]......
View 2 Replies
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
Mar 19, 2009
I have a little quiz, where at the end the results are calculated and the test takers are taken to a results screen which calculates their results.
I have AS3 code creating the message screen, and the score is calculating ok. I want to capture the users name on the results page, and this is not working. I have attached the code which calculates the score and where I added the instance name of the test box when they login. I get an error when I publish. The error is "Access of undefined property name name_text"
obviously this is not how to capture that information, but not sure how to do it. Again, I have a text box with the instance name of "name_txt", and I am trying to capture that data on a results screen using AS3.
Code:
feedback.text = "Congrats" +name_txt+ "on finishing the exam!
Your score is "+Math.round(score*100)+"%
You may now close the exam window.";
View 1 Replies
Oct 20, 2010
I'm having some resizing/full-screen difficulty with loading an external quiz swf into a video player swf. What's happening is that, when the quiz swf is first loaded into the video player, the size of the loaded swf has the correct dimensions and aspect ratio. That part is fine, but as soon as I try to fullscreen or resize the video player (using listeners with stage dimensions) the external quiz swf changes dimensions on me and looks vertically squished and smaller.
I've talked to other people about this issue, and they're telling me that this issue is occuring because the quiz swf contains elements outside of the stage. These hidden elements are supposedly giving the video player "incorrect" dimensions. Is this really the case? Is there any other solution other than fitting any hidden elements within the quiz swf within the stage? And if this is the only solution, then why on initial load does the quiz swf show up properly?
View 1 Replies
Apr 9, 2007
I will be creating a program to use for data entry. I'll be studying zebras in kenya and I won't have the internet there as I'm recording the data. I'd like to be able to send the data I generate in flash to an external text file. I understand I need some sort of script to do that, but is this something I can run just on my machine? (I'll probably make the data into xml format).
View 1 Replies
Apr 22, 2007
Question 1: How do I add a filter to a movieclip from actionscript,More specificly, the "adjust color" filter, and I want to decrease brightness, saturation,hue, and contrast... by actionscript...If you dont know what I mean, use the circle tool to create a circle, convert to movie clip, click the "filter" tab, then click + and add a adjust color filter, you'll see what I mean...Question 2: I need to output text to 'text' documents, no I cannot use shared objects for this, as it is a program for a client, and it isn't safe enough for me.
Code:
var archive:Array = [];
archive[7] = "Hello I am the 8th archive";
[code].....
View 4 Replies
Aug 20, 2011
I'd like to know if there's a way to take data entered into a field in flash, save it, and call it later via an object.I don't want anyone to walk me through it if there is, that's not what I'm asking. I'm just asking what I need to know in order to do this. I'd like to build a certain flash app that takes information (such as a name, paragraph, and/or sentence) saves it, and can then be recalled when a user clicks a button... even if the user has closed out the application.I'm still relatively new to flash, I know enough to get by on basic projects, but I want to expand my knowledge so I don't end up stuck in a beginners rut.Would this require using PHP and Flash? Or can it be done entirely in flash via exporting data to a designated external file?
View 2 Replies
Feb 8, 2012
Creating a high score table in flash, using external file handling, can be achieved using server-side scripts, such as PHP. However, as this is not allowed for my game (school project), I need a way to write a few variables directly to a text file and read it back again. Is this possible? I am using AS 2.0. Any other ways in which a high score table, which is portable and can be saved and updated
View 3 Replies
Mar 14, 2011
I'm trying to read some data in from a sql source, some of which contains double quotes embedded in the text. I know I can strip the doublequotes, but don't want to go that route if I can avoid it. I've tried replacing to double quotes with hex codes before passing the text via parameter to my flash file, but the text string always cuts off at the hex code, the same as if the double quote were present in the string. For example:This is a "text" stringreplace double quotes with hex: This is a x22textx22 stringesults when read into flash: This is a <remainder is dropped>Yet if I type the same text string in a variable in flash, the string displays the double quotes properly:
View 1 Replies
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
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
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
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
Jan 31, 2007
I have made a quiz from mixing and matching from various tutorials of the internet, and now want to make the questions (multiple choice) and possibly the answers appear shuffled. The xml looks like this:
<quiz>
<title>Quiz</title>
<items>
<item>
<question>In which continent is the country Japan located?</question>
<answer correct="y">Asia</answer>
<answer>Europe</answer>
<answer>Africa</answer>
<answer>America</answer>
</item>
and here is what I've got so far with the actionscript!
View 2 Replies
Nov 9, 2009
I've been fiddling around with the flash quiz template and it's pretty much what I need to a point. But I really just need is to know how to keep score?
View 1 Replies
Feb 15, 2011
i am new in this flash thing and in the learning stage. on the stage are four buttons. they will behave like map. now what i want to do is, that i want to use xml. when i click on button, it should display some text, like title, description, address etc below the map and the these details should come from an external xml file.
View 1 Replies
Mar 1, 2012
i have to create SWF that contains only specific parser and load text content from external file . How i can allow search engines to see this data under swf link ?
View 2 Replies
Jul 5, 2002
it took me so long to write this tutorial Well, here I go... Section 1: Introduction So you want dynamic content on your Flash movie. Sounds simple, right? Well let me tell it is, and well, it isn't. This tutorial assumes a basic knowledge of Actionscript, PHP and MySQL. If you have that, it's time to move on. Otherwise, I recommend you do some reading on the subjects... Section 2: Setting up your SWF to receive external data Loading external data into an SWF is a fairly simple task. Although the external text file method is probably the most widely known, it is by far the clumsiest way to get data into your SWF. Of course, this may be your only option of your server doesn't support MySQL/PHP! But for those of us who are fortunate to have these privileges, let me show you how Flash can get external data without having to create additional text files.
Dynamic text fields In order for Flash to get data from an external source, you need to make use of dynamic text fields. Simply place a blank dynamic text field on the stage and make sure you give it a variable name (NB: dynamic text fields have both an instance AND a variable names. In this case we want to focus on the variable name). Note the name you give to the field's variable name, as we'll need it when we write our PHP script. Once you have a text field setup, convert it to a movie clip symbol. Attach the following code to the resulting movie clip:
[Code]...
View 8 Replies
Nov 9, 2006
I have this code inside my flash to name my navigation menu. Now I want to put this outside flash and load it via XML. How do save my different arrays into a variable for later use in my code?
In my nav fla (what i want to load from XML):
Code:
// MAIN MENU ARRAY
var mm_array:Array = ["MAIN1", "MAIN2", "MAIN3", "MAIN4"];
// SUB MENU ARRAY
[Code]...
View 9 Replies
Oct 22, 2009
im fairly new to using actionscript i am making a quiz at the moment it has a few features.
Signup - Done
Login - Done
Admin - Not started
101 - Questions - 10 Done for testing
All info submitted by php/mysql - Done
So far as it says above i have 10 questions setup i use a php script to submit answers to mysql and update the users score after checking the answer from mysql. The questions are all written out on a keyframe each with radio buttons and checkboxes depending on the question. Well anyway i will get to the point.
I have can test the quiz and can get to question 4 before i get undifiend from the radio buttons on that frame i dont know why i keep getting it it is setup the same as the first 3 questions with the same code but the radiogroup is named differently.This may be terrible code but it worked for the first 3 so i dont see why its not working for the rest of them :S
[Code]...
View 1 Replies
Jul 7, 2011
" What does FPS stand for?"Below it, I have three potential answers:
A) Felt Pen Stimulator,
B)Fries Pickles Saurkraut,
C)Frames Per Second.
As you all (Hopefully!) know, the last answer is the correct one.What would I type in the Actions box so that when you click the right answer, it takes you to the next question,but when you click the wrong answer, it takes you to a game over screen? (Please, PLEASE make sure your code works before you tell me!)
View 2 Replies