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
Similar Posts:
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
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
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
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
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
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
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
Dec 30, 2010
I'm trying to create an application that receives variables passed through FlashVars and makes use of the new TLFTextField. I have run into an issue with accessing the FlashVars after declaring a TLFTextField variable.
The code I have is as follows:
ActionScript Code:
import fl.text.TLFTextField;
var tf:TextField = new TextField();
[code]....
The HTML file is passing a FlashVars value of "title=ThisIsTheTitle" If I run the code, the tf TextField is empty. If I comment out the last line that creates the TLFTextField, the FlashVars come through fine and the tf TextField displays the "title" variable that was passed through FlashVars.If I change the last line to read:
ActionScript Code:
var titleTLF:TextField = new TextField();
It works fine (the "title" variable from FlashVars is show in the tf TextField). I don't understand why delcaring a TLFTextField prevents the FlashVars from being accessed.
View 3 Replies
Feb 2, 2010
I need to display a word passed to the flash movie through flashvars. My objective is to display this word centered inside a black rectangle which length adapts to the word length. The box should be on top of everything, aligned with the right margin of the Flash Movie and 100px from the top margin.
View 6 Replies
Feb 17, 2010
I am sending variables from my html page:
Code:
<param name="FlashVars" value="nameCheck=boo&imageCheck=image01.jpg">
...in the parameters section of the flash object code.
I know that to extract the info I need to basically use:
Code:
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
...in my as3 code but I am wondering what would be the syntax to return a text field containing the sent variable 'boo' and fill an image area with the file name from the variable 'imageCheck'?
View 3 Replies
Oct 11, 2004
I have a dynamic text box for multiple questions in a text. We would like to get the text box to align bottom (so the text is always at the bottom of the box no matter how much text is in the varriable). Is there a way to do this?
View 5 Replies
Jun 27, 2009
What I am trying to do is rather simple, but I am having problems. All I want to do is pass the values entered into a TextInput component into a Dynamic Text Field I need this to be realtime, so when the user is entering the values it is updating in the text fields. I have 5 TextInput instances and 5 Dynamic Text Fields on the stage The TextInput values need to be passed to the Dynamic Text Boxes.
View 3 Replies
Apr 6, 2011
My employer is making a flash card and they want to customize it by passing a variable in the url that links to the card in order to fill in a dynamic text box.So the URL will have ?me=Bob on the end to but Bob's name inside the card.I've done this for them in the past but that was AS2 and I'm trying to use AS3 for this card. oward a code snippet or tutorial on the best way to accomplish this. If we could use an embedded font that would be a bonus.
View 3 Replies
Jun 28, 2009
The update to the Dynamic Text Box is always one character behind what is entered into the TextInput component. For instance my name is Shawn, if I enter "Shawn" into the Text Input the Dynamic Text Boxes will display "Shaw". It will only enter the "n" if I type another character then backspace it, deleting the extra character.
View 7 Replies
May 28, 2009
I want to know which is more effective to use in terms of passing values to flashvars.I have a dynamically created XML on the fly that will be assigned to a flashvar.I am planning to assign a whole xmldoc to the flashvar..it basically includes all the tags as in the whole xmlobject..and then i'll use this var to be able to display it on a carousel like image gallery.. Basically the content is all dynamic.Is it more preferrable to accept the XML PATH or the whole XML DOCUMENT for the flashvars?
View 1 Replies
Jul 20, 2009
I'm trying to pass on to my swf file the size of the document using javascript, flashvars, and swfobject. I've embedded my flash file using swfobject and used the generator that swfobject provides to declare the two flashvars. My index.html file looks like this:
ActionScript Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
[Code].....
flashv1 and flashv2 are the instance names of two dynamic text fields on the stage. For some reason, and I have been messing around with this all afternoon, I just cant get the flashVars to be retrieved by my code and be passed on to the text fields.
View 0 Replies
Jun 25, 2007
Send Dynamic variables from HTML to Flash.e.g FlashVars="title1=Title1&img1=001.jpg&desc1=Descri tion1&title2=Title2&img2=002.jpg&desc2=Descriptio n2...";because the number of photos are not sure. is there any way to loop through those variables in flash and save them in Arrays
View 2 Replies
May 7, 2010
I have a SWF with text embedded from an external .txt file. Is there a way I can have a different file used as the text source through the embedcode (swfObject) depending on the language?
Here is my current actionscript:
myData = new LoadVars();
myData.onLoad = function() {
text_clips.project_title.text = this.projecttitle1;
[Code]....
There are four languages needed so far, but this will grow so it needs to be flexible enough to let the developers add languages without getting a new SWF each time.
View 1 Replies
Mar 28, 2012
I set up a simple dynamic text on my stage.[code]...
How do I load this valueStr to my myText.text ?
View 3 Replies
Jun 7, 2010
I am trying to call a dynamic text field that's in a button. Something like:
Code:
btnName.textFieldName.htmlText = flashvarsObj.randomFlashVar || "";
I wish it was this simple, but unfortunately this doesn't seem to be working.
View 1 Replies
Jul 18, 2011
Using php to declare a few Flashvars. No problems - they all arrive and behave. One of these populates a dynamic text field inside an MC. Simple enough stuff right? But.... when I try to test equality on that text field I get nothing. I've tried EVERYTHING I can think of. The MC is called "fake2". The text field inside it has a variable name of "choice_dyna" and an instance name of "fd2".
[Code]...
View 1 Replies
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
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
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
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
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
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
Apr 14, 2010
I have an 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.
Loads the XML data
Code:
package exam {
import flash.net.* //to create URLRequest and load XML file
import flash.events.* //for Load events
//import flash.display.* //for testing purposes - remove when testing complete
//This class downloads the XML document, and then inserts info into arrays and variables.
[Code] .....
View 8 Replies
May 21, 2010
I was trying to produce an output of an array mixed up and limit the number. how that is done. Now need to incorporate into a quiz application which pulls in data via, XML, displays that, and shows the number of questions. So if 50 questions are in the XML file 50 questions will be displayed in the quiz. What I am trying to do is use the XML file as a question pool and randomly select say 30 questions out of the file to display. no luck so far, but I am making progress!
[Code]....
View 1 Replies