Hello.
I am using Macromedia Flash 8 Professional (I STRICTLY USE AS2) and working on an interactive quiz that contains 500 questions. We are all aware that when an fla. file contains so many graphics, animations, etc., it slows down the swf. file and sometimes even causes the *Not Responding* error. So I improvised and found a way. I made 500 fla. files which are all linked and are classified according to their categories. For example, under Chemistry is Matter and under matter is 15 questions. those questions are seperated files from each other as mentioned above. I want to ask you guys how to keep the score even when an external file is loaded. For example: on item#1 I got the correct answer. A "1" point should appear on let's say the upper right corner of my stage. Then, when i click next to move on to the next question (which is to load an externanl moviecip), it should take me to item#2 and that "1" point should be on my item#2 file and also i need to find out how to post how many correct answers were made after every lesson/topic every after lesson/subject.
SORRY FOR MY ENGLISH GUYS. I'M A FILIPINO. I DON'T KNOW IF I MADE MY SELF CLEAR. I HOPE I DID. I NEED YOUR HELP. I AM GOING TO SUBMIT THIS TO MY TEACHER AND IF I DON'T I WOULDN'T BE ABLE TO GRADUATE.
THE SUBMISSION IS NEAR AND I ONLY HAVE THE MAIN MENU JUST FOR NOW MAYBE JUST A WEEK LEFT. I WOULD BE FOREVER GRATEFUL AND WOULD PUT YOUR NAME IN MY CREDITS.
THANK YOU FOR YOUR REPLIES IN ADVANCE. GOD BLESS! ![]()
Message was edited by: CRAAZYGENIUS
How do i do that? I'm sorry i'm just good at thinking not doing. This is what i want to see:
1.) Answer 15 questions. (15 external movieclips)
2.) When i answer question # 1 and i get the response "CORRECT!", I acquire 1 point. Then i click the "next" button, it will load the next external file which is question # 2.
3.) When question # 2 is loaded, my 1 point should already be there.
4.) When i get the correct answer in question # 2 it should add another point to the 1 point earlier so that makes 2 points.
5.) After question # 15, let's say i got 7 correct answers. I want the 7 to appear on the next frame or next external movieclip. (I know dynamic texts are used.)
I need actionscripts and i need detailed explanations to do these.
I am not a programmer or an "actionscripter". PLEASE HELP. ![]()
Thank you for your response.
-NOTE. I JUST NEED ACTIONSCRIPTS FOR THE SCORES AND DETAILS HOW TO INPUT IT. THE "CORRECT" RESPONSE CAN BE DONE THROUGH "gotoandplay at frame or label".
Message was edited by: CRAAZYGENIUS
I found a software that can convert and compile a collection of swf files into one .exe application. It's called swfkit, the only problem i have now is the registration code and serial key. AND THE SCORING.
I named questions file name base on the category which they belong to. Example
Chemistry - SUBJECT Chemistry - SUBJECT
I I
Matter - COMPETENCY Elements - COMPETENCY
I I
Matter_001.fla/.swf, Elements_001.fla/.swf
Matter_002.fla/.swf, and so on. Elements_002.fla/.swf, and so on.
I also have PHYSICS and EARTH SCIENCE (MAKING IT 500 QUESTIONS ALL IN ALL)
Thank you for accommodating me sir. I really need your help.
Message was edited by: CRAAZYGENIUS
Message was edited by: CRAAZYGENIUS
as2 has no easy way to detect the frame label of a frame.
is there something else that will allow the main swf to determine if a an answer was correct or not? eg, if the last frame played in one of your swfs is greater than 20, can you infer the answer was correct (or can you always infer it was wrong)?
or, is there code in your swfs that indicates which answer is correct?
I don't know what kind of consistency you are asking for. But if i were to edit all 500 swfs. What would i modify? Because when i created question#1 i just hit save as to name the file question#2 so that i wont start from scratch in creating the next 499 questions. Hope this is what consistency means. Thanks. I'm still stuck. ![]()
Let me put it this way. In question1 swf, i added a behavior to button A (which is the correct answer to the question) that when it is clicked, it will jump to a frame that says, "CORRECT" while "B" "C" and "D" have the behavior that when is clicked will jump to the fram that says, "WRONG".
that won't work with a master swf unless it's an as3 swf. with an as3 master swf, you can load all your question swfs and it can detect which of the two frame labels were played.
or, you can use an as2 master swf and edit each of your question swfs and add code like:
this._parent.completeF(1)
to the last frame of a question swf when answered correctly and
this._parent.completeF(0)
to the last frame of a question swf when answered incorrectly.
which sounds better?
add that to a few of your swfs (to test that everything will work) and then create your master swf.
the master swf should probably contain some way for users to select which quiz they want to take. one or two comboboxes would work for that.
then use code to load the selected quiz and display the score:
var scoreVar:Number=0;
completeF(scoreVar);
var target_mc:MovieClip=this.createEmptyMovieClip("target_mc",0);
.
.
// in a combobox change listener:
target_mc.loadMovie("theselectedquiz.swf");
// create a score dynamic textfield (say score_tf) to display your score.
function completeF(n:Number):Void{
scoreVar+=n;
score_tf.text=scoreVar;
}
Thanks! I want to try that, but you see i don't know where to put those codes exactly. Please make a very detailed way to put those codes. I already made a swf that would let the users choose what kind of quiz they want to take. It goes like this,
When a user chooses one, they now choose what competency they want.
i hope my images helped. ![]()
Message was edited by: CRAAZYGENIUS
SUBJECT BUTTONS
on (release) {
//load Movie Behavior
if(this == Number(this)){
loadMovieNum("PHYSICS MENU.swf",this);
} else {
this.loadMovie("PHYSICS MENU.swf");
}
//End Behavior
}
SUB-BUTTONS
on (release) {
//load Movie Behavior
if(this == Number(this)){
loadMovieNum("VECTOR_001.swf",this);
} else {
this.loadMovie("VECTOR_001.swf");
}
//End Behavior
}
that has to change.
and, assuming you have code in your loaded swfs that re-load the menu swf, you'll need to change that too.
while you're changing code you may as well stop the bad practice of adding code to buttons. remove all that code, and assign your subject and sub-subject buttons instance names (in the properties panel).
all your button code should be attached to frame 1 of your main timelines and should look like:
physics_btn.onRelease=function(){
target_mc.loadMovie("PHYSICS_MENU.swf"); // where target_mc is created once in each swf that loads another swf as shown above.
}
North America
Europe, Middle East and Africa
Asia Pacific