Skip navigation
CRAAZYGENIUS
Currently Being Moderated

S.O.S.

Jul 20, 2012 6:13 AM

Tags: #help #scoring #actionscript_2 #score_issue #quiz_results #urgenthelp #click_counter #quiz_score

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

 
Replies 1 2 3 Previous Next
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 20, 2012 7:55 AM   in reply to CRAAZYGENIUS

    use a main file to load each the questions and display the score.

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 21, 2012 7:51 AM   in reply to CRAAZYGENIUS

    is there anything in your many files other than text questions?  are there graphics that accompany different swf?

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 21, 2012 9:48 AM   in reply to CRAAZYGENIUS

    then there's no easy way to change your setup to use one file.

     

    hopefully, you used consistency naming your 500 files and consistency in determining correct and incorrect answers.  did you?  if yes, what naming patterns did you use?

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 21, 2012 5:13 PM   in reply to CRAAZYGENIUS

    file naming looks good.

     

    what about questions and answers?

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 22, 2012 6:44 AM   in reply to 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?

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 22, 2012 11:11 AM   in reply to CRAAZYGENIUS

    is there anything consistent in your swfs to determine whether a question was answered correctly or not?

     

    if not, you will need to edit all 500 swfs.

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 23, 2012 3:05 PM   in reply to CRAAZYGENIUS

    is there anything in your question1 swf that indicates whether a question is answered correctly or not?

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 24, 2012 6:41 AM   in reply to CRAAZYGENIUS

    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?

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 24, 2012 8:16 AM   in reply to CRAAZYGENIUS

    which looks good?  there were two options.

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 24, 2012 10:09 AM   in reply to CRAAZYGENIUS

    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;

    }

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 24, 2012 4:41 PM   in reply to CRAAZYGENIUS

    what code is your physics button using?  what code are the physics sub-buttons using?

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 25, 2012 7:26 AM   in reply to CRAAZYGENIUS

    copy and paste the code for one of your subject buttons and one of your physics sub-buttons.

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 25, 2012 9:24 AM   in reply to CRAAZYGENIUS

    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.

    }

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 25, 2012 5:40 PM   in reply to CRAAZYGENIUS

    you're welcome.

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 27, 2012 11:19 PM   in reply to CRAAZYGENIUS

    what code are you using to load it?

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 29, 2012 10:55 PM   in reply to CRAAZYGENIUS

    you're not using any of the code i suggested.  i suggested different code because your code won't work to create a master swf that tallies an overall score.

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 30, 2012 9:08 AM   in reply to CRAAZYGENIUS

    var tl:MovieClip=this;

    vector_btn.onRelease=function(){

    tl.loadMovie("VECTOR_001.swf"); 

    }

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 30, 2012 4:19 PM   in reply to CRAAZYGENIUS

    you need to name your button, that loads that swf, vector_btn.  attach that code to first first frame that contains that button.

     
    |
    Mark as:
  • kglad
    72,188 posts
    Jul 21, 2002
    Currently Being Moderated
    Aug 4, 2012 12:43 AM   in reply to CRAAZYGENIUS

    see messages 16 and 22.

     
    |
    Mark as:
1 2 3 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points