ࡱ> Root Entryp|YrRASHM\ Contents,Page 1MSymbol 1"!#$%&'()*+-./01234Root Entryp|YrRASHX=\ ContentsPage 1MSymbol 1 !CPicPage CPicLayer CPicFrameCPicText{$W|@ TextField2 Arialpa flash quiz TSS$X@Arial(welcome back to the flash quiz. in version 3 of the quiz, we use arrays to store both the user's answers and the correct answers for each question. by using arrays, we make our code more succinct, legible, and easier to extend if we want to add new questions.w ?@ Arialpversion 38+)@Arial(? CPicShapeL hh'&h'&0ـhـ0ހ%Y4X$%%%Y4X%%$  0ـhـ0hh'&h'&V$%Y4X$%%%Y4X%% $%Y4X$%%%Y4X%%Vh'&h'&0ـhـ0h@ 000308@ 3Dھ0v0@0@303?housingOO CPicButtond on (release) { answer(1); }  on (release) { answer(2); } R on (release) { answer(3); } H @Arialq.1 !@ Arialpversion 1 !@ Arialpversion 2 \!@ Arialpversion 3# @Arial:: ,hArialwhen were movie clips introduced into flash? ?? question 1O ?H @Arialq.2A @Arial:: *hArialwhen was mp3 audio support added to flash?d on (release) { answer(1); }  on (release) { answer(2); } Ron (release) { answer(3); } !@ Arialpversion 3 !@ Arialpversion 4 \!@ Arialpversion 5 ? ? question 2OO? I displayTotalhArial( q y@Arialpthank you for taking the quizD  8@Arialpyour final score is:0@hArialp/2 ?quiz endOO ?init ?q2 ?quizEndlabelsO? // stop the movie at the first question stop (); // init main timeline variables var displayTotal; // textfield for displaying user's final score var numQuestions = 2; // number of questions in the quiz var totalCorrect = 0; // number of questions user answered correctly var userAnswers = new Array(); // array containing user's guesses var correctAnswers = [3, 2]; // array containing each // question's correct answer // function to register the user's answers function answer (choice) { userAnswers.push(choice); if ((userAnswers.length) == numQuestions) { gotoAndStop ("quizEnd"); } else { gotoAndStop ("q"+ (userAnswers.length + 1)); } } // function to tally the user's score function gradeUser() { // count how many questions the user answered correctly for(var i = 0; i < userAnswers.length; i++) { if(userAnswers[i] == correctAnswers[i]) { totalCorrect++; } } // show the user's score in an onscreen text field displayTotal = totalCorrect; } ?gradeUser(); scriptsO ?quizEndlabelsO  CDocumentPage Page 1Scene 1et9; Symbol 1button9r9*@hhhhhf Vector::Template"PublishFormatProperties::generator CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hx333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3d`3`f``x`px3`33x3fx3x3xx3nx3xfxxxxx3x333f333xf0f30ff(0f5Hf<`f@xH3 HfH(H2`8xf30f33PHff3(PHf3<x`f3Cxf3F3H33x`f3x`3(x`35x3<ff0f3fPHfff`ffP0xffPxffPfH3fx`ff0xf(0xf<xfCfHf3x`ff0xfx0xf̙dxf]H3x`f0x̙PPPf`f3xffxfxfxxfk`3xfxPxPdfxf3fffffxx3fx`3 `f`̙`(`0xx3xfxx x(x3`33xf3 x̙3x3(x323x33f3 333(f`3fxffx̙fxf(xf5fx3ffff ff(`3xfx̙P̙(P<x3f̙(`3xfx̙PPx3f(x3f̙xx3f3330fff`xPxx(xxxx0]1*]hxffxfxfxxfk`3xfxPxPdfxf3fffffxx3fx`3CPicPage CPicLayer CPicFrameCPicText{$W|@ TextField2 Arialpa flash quiz TSS$X@Arial(welcome back to the flash quiz. in version 3 of the quiz, we use arrays to store both the user's answers and the correct answers for each question. by using arrays, we make our code more succinct, legible, and easier to extend if we want to add new questions.w ?@ Arialpversion 38+)@Arial(? CPicShapeL hh'&h'&0ـhـ0ހ%Y4X$%%%Y4X%%$  0ـhـ0hh'&h'&V$%Y4X$%%%Y4X%% $%Y4X$%%%Y4X%%Vh'&h'&0ـhـ0h@ 000308@ 3Dھ0v0@0@303?housingOO CPicButtond on (release) { answer(1); }  on (release) { answer(2); } R CPicPage CPicLayer CPicFrameH0*0*0? 38sx*000** ssss? CPicShape3sH0*0*0? 333sH0*0*0?Layer 1O