1 2 3 Previous Next 96 Replies Latest reply: Sep 2, 2012 9:42 AM by kglad RSS

    S.O.S.

    CRAAZYGENIUS Community Member

      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

        • 1. Re: S.O.S.
          kglad CommunityMVP

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

          • 2. Re: S.O.S.
            CRAAZYGENIUS Community Member

            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

            • 3. Re: S.O.S.
              CRAAZYGENIUS Community Member

              ALSO IS THERE A WAY TO CONVERT MY 500+ SWF FILES INTO 1 TO MAKE IT LOOK LIKE AN APPLICATION THAT HAS ITS OWN ICON?

               

              THANKS FOR THE REPLY!

              • 4. Re: S.O.S.
                kglad CommunityMVP

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

                • 5. Re: S.O.S.
                  CRAAZYGENIUS Community Member

                  Yes. There are animations and graphics too. When a question is answered correctly or not, you are entitled to choose wether to view the explanation why it became the answer or to move on to the next question. The explanation is the interactive part because it is animated.

                  • 6. Re: S.O.S.
                    kglad CommunityMVP

                    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?

                    • 7. Re: S.O.S.
                      CRAAZYGENIUS Community Member

                      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

                      • 8. Re: S.O.S.
                        kglad CommunityMVP

                        file naming looks good.

                         

                        what about questions and answers?

                        • 9. Re: S.O.S.
                          CRAAZYGENIUS Community Member

                          Thanks. I designed the questions and answers in a graphical way. I only put behaviors on the choices/buttons "A" "B" "C" "D" that would gotoandplay at frame or label, "CORRECT" or "WRONG"

                          • 10. Re: S.O.S.
                            kglad CommunityMVP

                            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?

                            • 11. Re: S.O.S.
                              CRAAZYGENIUS Community Member

                              No. I don't know how to use AS2 in that kind of way. But if you can help me do it, I'd definitely use it. Because it's like i'm only using the gotoandplay at frame or label to create an illusion that my quiz is programmed or scripted.

                              • 12. Re: S.O.S.
                                kglad CommunityMVP

                                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.

                                • 13. Re: S.O.S.
                                  CRAAZYGENIUS Community Member

                                  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.

                                  • 14. Re: S.O.S.
                                    kglad CommunityMVP

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

                                    • 15. Re: S.O.S.
                                      CRAAZYGENIUS Community Member

                                      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".

                                      • 16. Re: S.O.S.
                                        kglad CommunityMVP

                                        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?

                                        • 17. Re: S.O.S.
                                          CRAAZYGENIUS Community Member

                                          Yes. That looks good. But i can't understand it fully. Please add more details sir. Thanks.

                                          • 18. Re: S.O.S.
                                            kglad CommunityMVP

                                            which looks good?  there were two options.

                                            • 19. Re: S.O.S.
                                              CRAAZYGENIUS Community Member

                                              the "this._parent.completeF(1)

                                              • 20. Re: S.O.S.
                                                kglad CommunityMVP

                                                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;

                                                }

                                                • 21. Re: S.O.S.
                                                  CRAAZYGENIUS Community Member

                                                  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,

                                                   

                                                  untitled.JPG

                                                  When a user chooses one, they now choose what competency they want.

                                                   

                                                  untitled2.JPG

                                                   

                                                  i hope my images helped.

                                                   

                                                  Message was edited by: CRAAZYGENIUS

                                                  • 22. Re: S.O.S.
                                                    kglad CommunityMVP

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

                                                    • 23. Re: S.O.S.
                                                      CRAAZYGENIUS Community Member

                                                      My Physics button has a behavior *load external movieclip* it loads PHYSICS MENU.swf
                                                      and Physics sub-buttons have behaviors *load external movieclip* it loads VECTOR_001, VECTOR_002 and so on.

                                                      • 24. Re: S.O.S.
                                                        kglad CommunityMVP

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

                                                        • 25. Re: S.O.S.
                                                          CRAAZYGENIUS Community Member

                                                          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

                                                           

                                                           

                                                          }

                                                          • 26. Re: S.O.S.
                                                            kglad CommunityMVP

                                                            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.

                                                            }

                                                            • 27. Re: S.O.S.
                                                              CRAAZYGENIUS Community Member

                                                              Yes. I should probably end that habit. I just don't know an alternative way to do it. Thanks for the code, i'll try it later and i'll tell you what happened.

                                                              • 28. Re: S.O.S.
                                                                kglad CommunityMVP

                                                                you're welcome.

                                                                • 29. Re: S.O.S.
                                                                  CRAAZYGENIUS Community Member

                                                                  i can't load the Physics Menu.swf.. Is there a code that i need to put on the Physics Menu?

                                                                  • 30. Re: S.O.S.
                                                                    kglad CommunityMVP

                                                                    what code are you using to load it?

                                                                    • 31. Re: S.O.S.
                                                                      CRAAZYGENIUS Community Member

                                                                      i am using this

                                                                       

                                                                      on (release) {

                                                                       

                                                                       

                                                                                //load Movie Behavior

                                                                                if(this == Number(this)){

                                                                                          loadMovieNum("PHYSICS MENU.swf",this);

                                                                                } else {

                                                                                          this.loadMovie("PHYSICS MENU.swf");

                                                                                }

                                                                                //End Behavior

                                                                       

                                                                       

                                                                      }

                                                                      • 32. Re: S.O.S.
                                                                        kglad CommunityMVP

                                                                        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.

                                                                        • 33. Re: S.O.S.
                                                                          CRAAZYGENIUS Community Member

                                                                          i used the code to load it but i dont know what code is to be put in the file to be loaded. What code do i put in the Physics Menu.?

                                                                          • 34. Re: S.O.S.
                                                                            kglad CommunityMVP

                                                                            var tl:MovieClip=this;

                                                                            vector_btn.onRelease=function(){

                                                                            tl.loadMovie("VECTOR_001.swf"); 

                                                                            }

                                                                            • 35. Re: S.O.S.
                                                                              CRAAZYGENIUS Community Member

                                                                              It still doesn't load the external movieclip. Could you put some instructions where i would put the code specifically. Very detailed please. ALL THE CODES I AM GOING TO USE.

                                                                              • 36. Re: S.O.S.
                                                                                kglad CommunityMVP

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

                                                                                • 37. Re: S.O.S.
                                                                                  CRAAZYGENIUS Community Member

                                                                                  it works..now what do i do to get the scores as the quiz goes on.?each time a subtopic is answered, the user is given the final score. also i would like to put a score on the top right corner of the screen as the user answers the questions.

                                                                                  • 38. Re: S.O.S.
                                                                                    kglad CommunityMVP

                                                                                    see messages 16 and 22.

                                                                                    • 39. Re: S.O.S.
                                                                                      CRAAZYGENIUS Community Member

                                                                                      thanks. i'll ask you if any problems occur..

                                                                                      1 2 3 Previous Next