How to make a quiz game in flash cs5




















If they are equal, the answer is correct else it is incorrect. So modify the script as follows. Bold lines. Our next target is to get an index number of selected radio button. But wait. It is not as straight forward as you think. We shall group radio buttons. They will act as a single component. So we can use getRadioButtonIndex method available with radio button group to get an index number of a selected radio button which is our next task. This step is really important in terms of the approach we have attempted here to develop this XML driven quiz application.

This step will not only satisfy our second need of getting an index number of selected radio button but we are also adding a new function checkAnswer to the script as follows,.

They are responding showing result. Now we are very close to the final version. We were dealing with only one question up to this step. This is my second question. This is my third question. I had intentionally placed different number of options for different questions. You can have your choice. This is the climax scene of our movie. So watch it carefully otherwise you will not be able to tell the story to others. So first read following points.

We shall utilize this var to point out XML index number of a question and so the related options going to be displayed on the stage. See it soon. This will hold all radio buttons of current question. And will help to remove those radio buttons from the stage and add new ones. This is an important member of our family. It will open the door to meet the next question and its option. In our two functions i.

We are going to handle it in a script. After creating a button our next task is to make it functioning. Modify function checkAnswer e:MouseEvent as shown Bold lines. This functions checks for correct answer. Typography is an important part of any project Digital or Non Digital. It really matters how text is handled.

Important to say, that we are also making the text colour of result to change as per the answer. Nice Music Please!!! After completing this Flash tutorial you are able to develop any XML driven application. We also got opportunity to handle radio buttons. In the final section we did text formatting which will certainly help in your future work.

We need to utilize some Actionscript code snippets, some nesting of animations and just a basic understanding of how to set up the timeline so this works well. Here are the requirements I gave my students. I teach middle school technology and love to play around with tech and teach students and colleagues alike.

You can read my blog at www. That is a good question. Myself, I just had it move onto the next question if the picked the correct choice. If you are still having a little problem go ahead and send it to me at itbabblerocks gmail. That way I can take a look at it and we can work out a solution. You are commenting using your WordPress.

You are commenting using your Google account. Write ActionScript statements that assign quiz questions to the array "strQuestionsArray. The top six statements load the programming libraries your game needs to run. Event; import fl. ComponentEvent; import fl. ColorPickerEvent; import fl. RadioButtonGroup; import flash. Write ActionScript statements that assign the quiz's answers to the "strAnswers" array.

For example, paste the following statements after the statements from previous step. Paste the following ActionScript statements into the "Actions" window, following the statements from the previous step.



0コメント

  • 1000 / 1000