ActionScript 2.0 :: Data Tracking For Custom Quiz?
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
Similar Posts:
Mar 24, 2004
I am currently trying to create a multiple choice quiz. Alright, what I want to do is this - I want to create a multiple choice like this, where user click the answer and they will be linked to a feedback page, telling them what is wrong with their answer. Then they can click an "OK" button to proceed to the next scene where there will be the next qns. The reason why I am not putting all in the same scene is because I need to do up a different scenario for each of the qns.
If I were to have ten qns in one scene, I was told it is "no good" by my lecturer. At the end of the ten qns, there will be a grading of points. I want the script to be able to track all correct answers despite all qns being on different scenes. Because I want the grade to show at the evaluation scene. is it possible to capture the answer user has clicked on, store to the array, store in another array as one point if it is a correct answer and click next to go to the next scene for the 2nd qns, not next frame.
View 14 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
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
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
Jun 8, 2009
I am trying to take some XML from a web service that looks something like this:
<User>
<UserData>
<ID>1</ID>[code]....
That works. However I have been unable to manipulate that into an XMLList. (I'm not sure that is the best course of action however.)I have tried this:
var
myXMLList:XMLList = x.UserData;
and var myXMLList:XMLList = x.User; Neither of these work. (Again, not sure if this is even what I need to do.)
View 4 Replies
Aug 9, 2010
I am trying to pass custom event data from 1 class to another class...here is my codes..[code]
View 2 Replies
Oct 27, 2010
How can I get some var / data from a custom classes?The XML class
package classes
{
import flash.net.URLLoader;
[code].....
View 3 Replies
Jan 24, 2012
Consider the following function:
public function foo(bar1:int, bar2:uint, bar3:String, bar4:Boolean):void{}
What I want is to have the different types of data represented by custom named types which are essentially representing the original data types. In other words, I would like to proxy the data types and have a valid function as following[code]...
View 3 Replies
Aug 17, 2009
Below is basic structure of LetterClip class which extends WMovieClipwhich inreturns extends Movieclip Class.
public class LetterClip extends WMovieClip
{
public function LetterClip(char:String):void
[code]...
Error occurs at the push statement.It throws the given below error only when the same activity is executedsecond time in a sequece.
TypeError: Error #1034: Type Coercion failed: cannot convertorg.waterford.activity.erp.erp1.r1lt08.clipclass::LetterClip@282e9281 to org.waterford.activity.erp.erp1.r1lt08.clipclass.LetterClip.#Operating System: Windows XPBrowser: Microsoft IE
View 1 Replies
Sep 14, 2010
I have a Game-sprite representing a game room with up to 3 players, it works ok. And would like to populate a List component with those Game's, based on an XML data coming from a socket.I've prepared a simple test case demonstrating my problem -ListTest.fla (should have a List component in its Library):
import fl.data.*;
import fl.controls.*;
stop();
[code].....
View 1 Replies
Aug 23, 2011
Is there any way to attach custom data to elements? Kind of like the $.data() function in jQuery?I know you can subclass and element and add custom parameters, but it would be an overkill to create custom class just to add a single custom parameter.
View 4 Replies
Apr 26, 2011
I have an application where I'm loading in XML data externally. What i'm trying to figure out is the best way to store this data in my application so that I can pass the relevant XML or data to my custom classes.
Basically I have a navigation and gallery class I have written both of which are instantiated on the document class, I would like to pass them each their corresponding XML. My question is whether I should store or seperate the xml into objects in the document class first, or simply pass each class its own xml node? Is there another/more preferable way to handle XML data between custom classes?
View 2 Replies
Jul 22, 2009
I have a class called LevelHandler. Inside each LevelHandler object is a bunch of arrays, various numbers, etc. Instead of saving the data for all these things separately, I've decided to save my LevelHandler object.
Here's what I've tried:
[code]...
You all expected this to work, right? Just kidding, it didn't. The problem is, when I try to set levelHandler equal to myLocalData.data.levelHandler, there is a type coercion failure (converting an Object to a LevelHandler). I know why this was happening, so I tried to make use of the "as" keyword. Still, apparently saved data can only be stored and understood as an Object.So, how can I save this LevelHandler object such that it can be accessed in the future (like when I need to trace how many levels there are)?
View 5 Replies
Oct 5, 2009
Basiclally a simple thing, however i dont get an idea on how to solve this one:
Say I have a sprite which is already existing during runtime and at some certain point I want to attach some custom data to it, say, in a string.
How would I do that?
s:Sprite = new Sprite();
s["extra"] = .... gives me an error, so i got exactly that far till here.
s.name is already reserved for another string and for sure I thought about just adding a TextField with the string inside to it, like
s.addChild(myStringTf);
But I know there is a better way, I just cant find it. hasOwnProperty() just returns a boolean true in case i match the value already assigned to it, right? Isn't there a way to attach an annonymouse object to it?
View 7 Replies
Feb 5, 2010
I'm currently building an application that is presenting tabular (fetched from a webservice) data and have squirted it into a datagrid - seemed the most obvious way to present it on screen. I've now come across a few limitations in the datagrid and wonder how I might move forward. The data is logically split into groups and I would like to be able to have subheadings in the grid whenever I move to a new group. I would like to be able to highlight individual cells based on their content relative to other values in the row - ie highlight the cell with the highest value in the row. Is this possible with the standard datagrid?
View 2 Replies
Apr 14, 2010
I am working on actionscript to generate a SWF dynamically using JSON data coming from an HTTP request. I receive the data on creationComplete and try to generate a tree like structure. I don't create the whole tree at the same time. I create 2 levels, level 1 and level 2. My goal is to attach custom events on the panels which represent tree nodes. When users click the panels, it dispatches custom events and try to generate the next level.
So, it goes like this :
On creation complete -> get JSON-> create top tow levels -> click on level 2-> create the level 2 and level 3 -> click on level 3-> create level 3 and 4. and so on and so on. I am attaching my code with this email. How to do this if you need to paint a tree having
total level number = "n" where n = 0 to 100
Should I carry the data around in CustomPageClickEvent class.
[Code]
import com.iwobanas.effects.*;
import flash.events.MouseEvent;
import flash.filters.BitmapFilterQuality;
import flash.filters.BitmapFilterType;
import flash.filters.GradientGlowFilter;
[Code] .....
View 1 Replies
Jul 27, 2011
i'm using flash builder 4..i want to ask something..how to binding data to custom list component in flex??...i already try binding data from webservice to standard datagrid component in flex, and it's work perfectly...this is my code for binding to datagrid..
<mx:DataGrid includeIn="LobbyPage" x="30" y="319" id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{TakeUserResult4.lastResult}">
[code]....
View 1 Replies
Jul 29, 2011
I'm trying to create a custom class that will create a tile (a small rounded square) when requested, with a small image on it. I can successfully create the tile, as shown in the code below, but I don't know how to pass the class the pictures data.Is it possible to do this using bitmapData, or by referancing it throught the library (if i store my picture in a movieclip in the library?[code]
View 3 Replies
Feb 28, 2012
is it possible to create an item renderer for the data labels of a Flex Pie Chart?i know it is possible to change the formatting of the String using the label function. But i need more control of the way the data label appears.The background of the label needs to be a a specific color based on the data.
View 1 Replies
Mar 31, 2010
BTW, this should be in actionscript 3.
What's the fastest way to dump your data (not in a file) into a bitmap for display?
I had it working with setPixels and colored rects but that's way too slow.
Is there a way to load in the raw bytes or hijack the loader class to put in custom loader data?
View 0 Replies
Oct 14, 2011
I'm trying to bring data from an sqlite database into a custom made menu. I have the menu working using an array with the code shown. But, now I would like the data to come from an sqlite database.
The code shown for the database, I have used for a previous job that pulled the data into a dataGrid. I now want that same data to put into my custom menu instead of a dataGrid. How would I change the second code to do this?
I think my main question is about the "watername_dg.addItem" in the second code below and how to change that to bring the data into my buttons.
ActionScript Code:
//////////////PULLING DATA FROM AN ARRAY TO BUILD MENU//////////////
var _menuArray:Array = new Array("Apples","Oranges","Pears","Grapes","Limes", "Carrots", "Peas", "Beans");
[Code].....
View 8 Replies
Oct 14, 2010
Once a button is clicked in a submenu called SelectChar(a menu class extending my menu base class), it dispatches a custom event carrying an array of variables. This event is then listened for in the main Document Class called Engine, where the value of the passed variable can be used. For testing purposes im only passing 1 arguement in the array.
my Error when trying to trace the passed variable in isolation "trace(e.arg[0]);": 1119: Access of possibly undefined property arg through a reference with static type flash.events:Event.
Okay, i hope that made sense... heres the relevent code:
custom event class: passCharEvent.as
Code: Select allpackage com.asgamer.snipergame
{
import flash.events.Event;
public class passCharEvent extends Event
[Code].....
View 2 Replies
Sep 16, 2009
How can I define a custom data type in flash? for example in C/C++ I can do something like this:
[Code]...
Is there a way something like this can be done in flash? Basically I want to be able to create my own variable types.
View 3 Replies
Oct 14, 2010
I'm trying to pass a string variable with custom event and having a problem retrieveing the string when the event is handled. The event fires OK, and I can trace the string in the Event, but it returns "undefined" in the event handler. I'm hoping it's just a typo or something, but it's got me stumped. Below is my Event code and the handler code. [code]
View 2 Replies
Feb 8, 2010
I need to create a custom Object that basically stores some custom parameters (properties?), which I have successfully done, and the code below works fine.
PHP Code:
myObject = new Object();
myObject.nameLabel = "New Releases";
myObject.artOrientation = "portrait";
myObject.artAmount = 5;
I find the new compiler and debugger capabilities very useful, since I'm not the most detail-oriented, so I (usually) like that Flash forces me to strict-type my variables and such. Anyway, I was wondering if it's a "best practice" to strict data type a custom objects' properties, and if so, how to do it in the logic above? I kept getting syntax errors when I just tried it initially.
I know if I created a custom Class .AS file, I would be forced to data type the properties... but I'd rather just do it "in-line" in my main .FLA file. Also, I know I can just pass typed VARIABLES to the properties... but I'd rather have the properties strict-typed themselves... so if I try to pass a variable as the wrong type, then I would still get an error.
View 2 Replies
Aug 30, 2006
I began with a class for a movie clip rollover function FigureRollOver. It works marvellously. Three things happen:
1) it loads XML from a file "mod1_fig1.xml" and uses another class, XMLMember, to retool the scoping of the XML so that I can get at it
2) an onload call inside of XMLMember calls the myOnLoad function and transfers the XML into an array.
3) so long as the array is finished building, rolling over a movie clip attaches a new movie clip with the rollover text in it.But I don't want all those functions in one because I need it to be more dynamic, starting with being able to load any old xml file instead of just "mod1_fig1.xml", plus it seems lik overbuilding to have all of that in one class, so I've separated out the loading of the XML and building of the array into its own class, FigureXMLLoader. FigureRollOver is then left to just attach the rollover with text in it, extracted from the array built by the new class.
Problem is, though the array builds inside FigureXMLLoader, I can't figure out how to make it available outside the class. I know that I'm constructing things in the wrong order, and that the array needs to be somehow built inside the class function to be available, but I can't figure out how to do that. A cruddy work-around is to put a function call at the end of the building of the array, which calls yet ANOTHER function on the main timeline of my .swf to put the array I've just built into a new variable.This works, but it's messy. It seems like I should be able to have one line of script in the .swf that generates an array on the main timeline (or just a public array) which I can then access from my FigureRollOver class:
var myRollOvers:Array = new FigureXMLLoader("mod1_fig1.xml");
Here is FigureXMLLoader (see comments in the code for more details) which obviously does not return an array as it is, because of all the working around I've had to do. Note the "testing" variable, which can be traced from the main timeline of the .swf, but I will get "not what I want" because of course the array hasn't been built yet, and never will be, inside of the declaration as it is. How do I get it in there so I can return an array?
View 2 Replies
Dec 11, 2006
I would like to basically create an flash application that would allow a visitor to answer a few questions and then be presented with an image based on the answers provided via a form. If the generated output is not acceptable - I would like the visitor to be able to regenerate the output with a single click and continue to do so until the image is acceptable. The questions/process would be something like:
1. What is your favorite shape? (a drop down list of data from DB would be selectable)
2. what is your favorite color? (same as above option)
3. what is your favorite things to do? (this answer would work similar to a search and match keywords related to images within the DB and be placed in a designated area of the image)
4. what is your name? (first - last)
the results would then generate a image... Does anyone know where I can begin the process of making a application like this?
View 3 Replies
Mar 6, 2012
I have a datagrid and I need the user to enter data in one of the columns. I have gotten that far, but I havnt been able to get the data the user types in. I need the input from the user. How do I retrieve it
percentColumn = new DataGridColumn();
percentColumn = dg.getColumnAt(3);
percentColumn.cellRenderer = LoaderCellRenderer;
[code]......
View 1 Replies