{"id":1090,"date":"2011-10-27T05:52:23","date_gmt":"2011-10-27T09:52:23","guid":{"rendered":"http:\/\/www.searchenginegenie.com\/web-design-blog\/?p=1090"},"modified":"2011-10-27T06:26:18","modified_gmt":"2011-10-27T10:26:18","slug":"baloon-shooting","status":"publish","type":"post","link":"https:\/\/www.searchenginegenie.com\/web-design-blog\/baloon-shooting\/","title":{"rendered":"Balloon Shooting"},"content":{"rendered":"<p><strong>BALLOON SHOOTING<\/strong><br \/>\nPlay the game and try to shoot as many balloons to collect maximum points. <\/p>\n<p><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=7,0,19,0\" width=\"300\" height=\"400\"><param name=\"movie\" value=\"http:\/\/www.searchenginegenie.com\/web-design\/flash\/balloon_shooting.swf\" \/><param name=\"quality\" value=\"high\" \/><embed src=\"http:\/\/www.searchenginegenie.com\/web-design\/flash\/balloon_shooting.swf\" quality=\"high\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\" type=\"application\/x-shockwave-flash\" width=\"300\" height=\"400\"><\/embed><\/object><\/p>\n<p>1. Create a new movie with dimensions of 300px. X 400px. and fps = 24 with white color as Background Color.<\/p>\n<p><a name=\"imageclose-1091\"><div class=\"lb-album\"><a href=\"#image-1091\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/411.jpg\"  class=\"aligncenter size-full wp-image-1091\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1091\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1091\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/411.jpg\" alt=\"image-1091\">\r\n                   <\/div><\/a><\/p>\n<p><strong>CREATING CLICK TO PLAY SCENE<\/strong><\/p>\n<p>1. Select frame 1 on Layer 1<br \/>\n2. Select the &#8220;TEXT&#8221; tool type <strong>BALLOON SHOOTING<\/strong> as a game title as shown in the image<\/p>\n<p><a name=\"imageclose-1092\"><div class=\"lb-album\"><a href=\"#image-1092\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/401.jpg\"  class=\"aligncenter size-full wp-image-1094\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1092\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1092\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/401.jpg\" alt=\"image-1092\">\r\n                   <\/div><\/a><\/p>\n<p>3. Here we have used &#8216;Arial&#8217; font for the text. You can use any other font of your choice<br \/>\n4. Rename the layer as &#8216;BALLOON SHOOTING&#8217;<br \/>\n5. Below the game title type the text as shown in the image.<\/p>\n<p><a name=\"imageclose-1093\"><div class=\"lb-album\"><a href=\"#image-1093\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/39.jpg\"  class=\"aligncenter size-full wp-image-1095\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1093\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1093\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/39.jpg\" alt=\"image-1093\">\r\n                   <\/div><\/a><\/p>\n<p>7. Choose Insert > Layer to insert a new layer above the Balloon Shooter layer<\/p>\n<p>8. Rename the layer as &#8216;Click to Play&#8217;<\/p>\n<p>9. With the help of &#8216;Text&#8217; tool type text as &#8216;Click to Play&#8217; below the existing text<\/p>\n<p>10. Select the text and choose Insert > Convert to Symbol. Convert it into a Button with the center Registration point selected and name it as &#8216;play&#8217;<\/p>\n<p><a name=\"imageclose-1094\"><div class=\"lb-album\"><a href=\"#image-1094\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/37.jpg\"  class=\"aligncenter size-full wp-image-1096\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1094\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1094\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/37.jpg\" alt=\"image-1094\">\r\n                   <\/div><\/a><\/p>\n<p>11. Double click the play button to go inside it<\/p>\n<p>12. Select frame 2 at Over stage and choose Insert > Keyframe <\/p>\n<p>13. With the help of &#8216;Fill Color&#8217; option in the &#8216;Tools&#8217; panel change the text color to &#8216;Red&#8217;<\/p>\n<p><a name=\"imageclose-1095\"><div class=\"lb-album\"><a href=\"#image-1095\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/36.jpg\"  class=\"aligncenter size-full wp-image-1097\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1095\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1095\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/36.jpg\" alt=\"image-1095\">\r\n                   <\/div><\/a><\/p>\n<p>14. Select frame 4 at Hit stage and choose Insert > Frame<\/p>\n<p>15. Rename the layer as &#8216;Play Button&#8217;<\/p>\n<p>16. Insert a new layer above Play Button layer and drag it downward so that it appears below Play Button<\/p>\n<p>17. Select frame at Hit stage and choose Insert > Keyframe<\/p>\n<p>18. Draw a rectangle patch as a &#8216;hit area&#8217; of the button<\/p>\n<p><a name=\"imageclose-1096\"><div class=\"lb-album\"><a href=\"#image-1096\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/35.jpg\"  class=\"aligncenter size-full wp-image-1098\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1096\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1096\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/35.jpg\" alt=\"image-1096\">\r\n                   <\/div><\/a><\/p>\n<p>19. Come back into Scene 1<\/p>\n<p>20. Select the Play button and choose Window > Actions<\/p>\n<p>21. In the Actions panel type the following action<br \/>\n<code>on (release) {<br \/>\n\tgotoAndStop(2);<br \/>\n}<\/code><\/p>\n<p><a name=\"imageclose-1097\"><div class=\"lb-album\"><a href=\"#image-1097\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/34.jpg\"  class=\"aligncenter size-full wp-image-1099\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1097\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1097\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/34.jpg\" alt=\"image-1097\">\r\n                   <\/div><\/a><\/p>\n<p>22. Insert a new layer above Click to Play layer and name it as &#8216;Actions&#8217;<\/p>\n<p>23. Select frame 1 on the Actions layer and in the Actions panel type the following action<br \/>\n<code>fscommand(\"showmenu\",false);<br \/>\nstop();<\/code><\/p>\n<p><strong>GREATING GAME SCENE<\/strong><\/p>\n<p>1. Select the Click to Play layer and insert a new layer above it<br \/>\n2. Rename the layer as &#8216;Score Panel&#8217;<\/p>\n<p><a name=\"imageclose-1098\"><div class=\"lb-album\"><a href=\"#image-1098\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/33.jpg\"  class=\"aligncenter size-full wp-image-1100\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1098\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1098\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/33.jpg\" alt=\"image-1098\">\r\n                   <\/div><\/a><\/p>\n<p>3. Select frame 2 on the Score Panel layer and choose Insert > Keyframe<br \/>\n4. Create a gradient panel with dimensions as 300px. X 35px. and place it at the bottom of the stage. <\/p>\n<p><a name=\"imageclose-1099\"><div class=\"lb-album\"><a href=\"#image-1099\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/32.jpg\"  class=\"aligncenter size-full wp-image-1101\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1099\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1099\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/32.jpg\" alt=\"image-1099\">\r\n                   <\/div><\/a><\/p>\n<p>5. Insert a new layer above Score Panel layer and name it as &#8216;Scores&#8217;<\/p>\n<p>6. Select frame 2 on the Scores layer and choose Insert > Keyframe<\/p>\n<p>7. With the help of &#8216;Text&#8217; tool create a Dynamic text field to display the score. In the Properties panel keep the settings as shown in the image.<\/p>\n<p>In the Variable field type the variable name as &#8216;score&#8217; <\/p>\n<p><a name=\"imageclose-1100\"><div class=\"lb-album\"><a href=\"#image-1100\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/311.jpg\"  class=\"aligncenter size-full wp-image-1103\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1100\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1100\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/311.jpg\" alt=\"image-1100\">\r\n                   <\/div><\/a><\/p>\n<p>8. Similarly create another text field and place it on the other hand. In the Variable field type the variable name as &#8216;missed&#8217;<\/p>\n<p>9. To understand what these two scores are showing type text &#8216;hits&#8217; and &#8216;miss&#8217; as shown in the image<\/p>\n<p><a name=\"imageclose-1101\"><div class=\"lb-album\"><a href=\"#image-1101\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/30.jpg\"  class=\"aligncenter size-full wp-image-1104\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1101\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1101\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/30.jpg\" alt=\"image-1101\">\r\n                   <\/div><\/a><\/p>\n<p>10. Select frame 2 on Actions layer and type the following action.<br \/>\n<code>stop();<\/code><\/p>\n<p><strong>CREATING FLYING BALLOONS<\/strong><\/p>\n<p>1. Insert a new layer above Scores layer and name it as &#8216;Balloons&#8217;<\/p>\n<p>2. Select frame 2 on the Balloons layer and choose Insert > Keyframe<\/p>\n<p>3. Create a balloon graphic of 28px. X 42px.<\/p>\n<p><a name=\"imageclose-1102\"><div class=\"lb-album\"><a href=\"#image-1102\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/29.jpg\"  class=\"aligncenter size-full wp-image-1105\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1102\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1102\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/29.jpg\" alt=\"image-1102\">\r\n                   <\/div><\/a><\/p>\n<p>4. Select the balloon on the stage, convert it into a Movie Clip with center registration point selected and name it as &#8216;balloon&#8217;<\/p>\n<p><a name=\"imageclose-1103\"><div class=\"lb-album\"><a href=\"#image-1103\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/28.jpg\"  class=\"aligncenter size-full wp-image-1106\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1103\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1103\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/28.jpg\" alt=\"image-1103\">\r\n                   <\/div><\/a><\/p>\n<p>5. Double click the balloon movie clip to go inside it<\/p>\n<p>6. Select frame 3 and choose Insert > Blank Keyframe<\/p>\n<p>7. At frame 3 create small gradient patches which looks like a bust balloon<\/p>\n<p><a name=\"imageclose-1104\"><div class=\"lb-album\"><a href=\"#image-1104\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/27.jpg\"  class=\"aligncenter size-full wp-image-1107\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1104\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1104\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/27.jpg\" alt=\"image-1104\">\r\n                   <\/div><\/a><\/p>\n<p>8. Select frame 4 and choose Insert > Blank Keyframe<\/p>\n<p>9. Insert a new layer and name it as &#8216;Actions&#8217;<\/p>\n<p>10. Select frame 1 on Actions layer and type the following action.<br \/>\n<code>stop();<\/code><br \/>\n11. Select frame 4 and choose Insert > Keyframe<\/p>\n<p>12. Select the keyframe 4 and in the Actions panel type the following action<br \/>\n<code>_parent.gotoAndPlay(3);<\/code><br \/>\n13. Insert a new layer below the Actions layer and name it as &#8216;Dummy Button&#8217;<\/p>\n<p>14. At frame 1 draw a oval shape which can cover the balloon under it<\/p>\n<p><a name=\"imageclose-1105\"><div class=\"lb-album\"><a href=\"#image-1105\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/26.jpg\"  class=\"aligncenter size-full wp-image-1108\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1105\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1105\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/26.jpg\" alt=\"image-1105\">\r\n                   <\/div><\/a><\/p>\n<p>15. Select the oval shape and convert it into a Button with center registration point selected and name it as &#8216;hit button&#8217;<\/p>\n<p>16. Double click the hit button to go inside it<\/p>\n<p>17. Select the shape on the frame 1 at Up stage and drag it on the frame 4 i.e. on Hit stage<\/p>\n<p><a name=\"imageclose-1106\"><div class=\"lb-album\"><a href=\"#image-1106\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/25.jpg\"  class=\"aligncenter size-full wp-image-1109\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1106\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1106\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/25.jpg\" alt=\"image-1106\">\r\n                   <\/div><\/a><\/p>\n<p>18. Come back into balloon movie clip<\/p>\n<p>19. Select the hit button and choose Window > Actions<\/p>\n<p>20. In the Actions panel type the following actions<br \/>\n<code>on (press) {<br \/>\n \tgotoAndPlay(2);<br \/>\n \t_root.score++;<br \/>\n}<\/code><br \/>\n\/\/ _root.score++;<br \/>\n\/\/ Everytime this button gets hit, the value of the variable &#8216;score&#8217; increases by 1<br \/>\n21. Select frame 2 on Dummy Button layer<\/p>\n<p>22. Choose Insert > Blank Keyframe<\/p>\n<p>23. Come back into Scene 1 <\/p>\n<p>24. Select balloon movie clip on the stage, convert it into another Movie Clip and rename it as &#8216;balloon move&#8217;<\/p>\n<p>25. In the Properties panel type the Instance Name as &#8216;balloon&#8217;<\/p>\n<p><a name=\"imageclose-1107\"><div class=\"lb-album\"><a href=\"#image-1107\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/24.jpg\"  class=\"aligncenter size-full wp-image-1110\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1107\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1107\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/24.jpg\" alt=\"image-1107\">\r\n                   <\/div><\/a><\/p>\n<p>26. Double click the balloon move movie clip to go inside it<\/p>\n<p>27. Select frame 2 and choose Insert > Keyframe<\/p>\n<p>28. Select balloon movie clip at frame 1 and delete it<\/p>\n<p>29. Insert a new layer over the existing layer and name it as &#8216;Actions&#8217;<\/p>\n<p>30. Select frame 1 and in the Actions panel type the following action<br \/>\nstop();<br \/>\n31. Select frame 2 and choose Insert > Keyframe<\/p>\n<p>32. Select frame 2 and in the Actions panel type the following action<br \/>\nstop();<br \/>\n33. Select frame 3 and choose Insert > Keyframe<\/p>\n<p>34. Select frame 3 and in the Actions panel type the following action<br \/>\n<code>removeMovieClip(\"\");<\/code><\/p>\n<p><a name=\"imageclose-1108\"><div class=\"lb-album\"><a href=\"#image-1108\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/23.jpg\"  class=\"aligncenter size-full wp-image-1111\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1108\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1108\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/23.jpg\" alt=\"image-1108\">\r\n                   <\/div><\/a><\/p>\n<p>35. Select the balloon movie clip at frame 2 and choose Window > Actions<\/p>\n<p>36. In the Actions panel type the following actions<br \/>\n<code>onClipEvent (load) {<br \/>\n \t_root.hitz = 0;<br \/>\n \tthis._alpha = 0;<br \/>\n}<br \/>\nonClipEvent (enterFrame) {<br \/>\n \tthis._y -= _root.speedz;<br \/>\n \tthis._rotation += 7;<br \/>\n \tif (this._y<=-80) {\n \t \tthis._alpha = 100;\n \t}\n \tif (this._y<=-380 &#038;&#038; _root.hitz == 0) {\n \t \tgotoAndPlay(2);\n \t \t_root.missed += 1;\n \t \t_root.hitz = 1;\n \t}\t \n \tif (_root._currentframe == 3) {\n \t \t_parent.nextFrame();\n \t}\t \n}<\/code>\t<\/p>\n<p><a name=\"imageclose-1109\"><div class=\"lb-album\"><a href=\"#image-1109\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/22.jpg\"  class=\"aligncenter size-full wp-image-1112\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1109\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1109\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/22.jpg\" alt=\"image-1109\">\r\n                   <\/div><\/a><\/p>\n<p>\/\/ _root.hitz = 0;<br \/>\n\/\/ this._alpha = 0;<br \/>\nWhen movie clip loads, the value of the variable 'hitz' is set to '0' as well as the initial alpha value of the movie clip is set to '0'<br \/>\n\/\/ this._y -= _root.speedz;<br \/>\nThe Y position of the movie clip goes on decreasing as per the value of variable 'speedz' (Movie clip moves upwards)<br \/>\n\/\/ this._rotation += 7;<br \/>\nThis action help the movie clip to keep on rotating at the speed of 7<br \/>\n\/\/ if (this._y<=-80) {\n \tthis._alpha = 100;\n \t}\nThis action checks whether the Y position of the movie clip is less than or equal to 80. If the condition satisfies then the alpha value of the movie clip is set to 100\n\/\/\tif (this._y<=-380 &#038;&#038; _root.hitz == 0) {\n \t \tgotoAndPlay(2);\n \t \t_root.missed += 1;\n \t \t_root.hitz = 1;\n \t}\t \nThis action checks whether the Y position of the movie clip is less than or equal to -380 and at the same time the value of variable 'hitz' is 0. If the condition satisfies then movie clip starts playing from frame 2 and the value of the variable 'missed' increments by 1. The value of variable 'hitz' is set to 1\n\/\/\tif (_root._currentframe == 3) {\n \t \t_parent.nextFrame();\n \t}\t \n}\t \t \nThis action checks whether the currentframe position in the root (i.e. level0) is at frame 3. If the condition satisfies then actionscript will go into the parent movie clip (balloon move movie clip) of the current movie clip and play the actions on the next frame.\n37. Now come back into Scene 1\n\n38. The balloon move movie clip looks like a dot on the stage\n\n<a name=\"imageclose-1110\"><div class=\"lb-album\"><a href=\"#image-1110\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/21.jpg\"  class=\"aligncenter size-full wp-image-1113\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1110\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1110\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/21.jpg\" alt=\"image-1110\">\r\n                   <\/div><\/a><\/p>\n<p>39. Select the balloon move movie clip and drag it downwards so that it appears below the stage area<\/p>\n<p>40. On frame 2 of Balloons layer create a small circle beside the balloon move movie clip<\/p>\n<p>41. Select that small circle and convert it into a Movie Clip and name it as 'trigger' <\/p>\n<p><a name=\"imageclose-1111\"><div class=\"lb-album\"><a href=\"#image-1111\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/20.jpg\"  class=\"aligncenter size-full wp-image-1114\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1111\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1111\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/20.jpg\" alt=\"image-1111\">\r\n                   <\/div><\/a><\/p>\n<p>42. Select the trigger movie clip and choose Window > Actions<\/p>\n<p>43. In the Actions panel type the following actions<br \/>\n<code>onClipEvent (enterFrame) {<br \/>\n \tif (_root.z%_root.intervalz == 0) {<br \/>\n \t \tduplicateMovieClip(\"_root.balloon\", \"balloons\"+_root.z, _root.z);<br \/>\n \t \tsetProperty(\"_root.balloons\"+_root.z, _x, random(200)+50);<br \/>\n \t \ttellTarget (\"_root.balloons\"+_root.z) {<br \/>\n \t \t \tgotoAndPlay(2);<br \/>\n \t \t}<br \/>\n \t}<br \/>\n \t_root.z++;<br \/>\n}<\/code>\t <\/p>\n<p><a name=\"imageclose-1112\"><div class=\"lb-album\"><a href=\"#image-1112\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/19a.jpg\"  class=\"aligncenter size-full wp-image-1116\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1112\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1112\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/19a.jpg\" alt=\"image-1112\">\r\n                   <\/div><\/a><\/p>\n<p>\/\/ if (_root.z%_root.intervalz == 0)<br \/>\nThis action checks whether the value of variable 'z' is perfectly divisible by the value of variable 'intervalz' <\/p>\n<p>\/\/ duplicateMovieClip(\"_root.balloon\", \"balloons\"+_root.z, _root.z);<br \/>\nIf the first 'if' condition satisfies then this action will create a duplicate movie clip of the balloon movie clip<\/p>\n<p>\/\/ setProperty(\"_root.balloons\"+_root.z, _x, random(200)+50);<br \/>\nThis action determines the X position of the duplicated movie clip<br \/>\n\/\/\ttellTarget (\"_root.balloons\"+_root.z) {<br \/>\n \t \tgotoAndPlay(2);<br \/>\n \t}<br \/>\nThis action lets the duplicated movie clip to play its second frame<br \/>\n\/\/ _root.z++;<br \/>\nThis action keeps on incrementing the value of variable 'z' by 1<\/p>\n<p>44. Insert a new layer above Balloons layer and rename it as 'Variables'<\/p>\n<p>45. Select frame 2 on Variables layer and choose Insert > Keyframe<\/p>\n<p>46. Select keyframe 2 and in the Actions panel type the following variables (Initialize the variables)<br \/>\nz=0;<br \/>\n\/\/ 'z' variable is used for Balloon movie clip<br \/>\nn=0;<br \/>\n\/\/ 'n' variable is used for Bonus Balloon movie clip<br \/>\nspeedz=7;<br \/>\nspeedn=10;<br \/>\nintervalz=20;<br \/>\nintervaln=50;<br \/>\nhitz=0;<br \/>\nhitn=0;<br \/>\nscore=0;<br \/>\nmissed=0;<br \/>\ntime=60;<br \/>\n\/\/ time=60 is initialized for one minute timer<\/p>\n<p><a name=\"imageclose-1113\"><div class=\"lb-album\"><a href=\"#image-1113\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/191.jpg\"  class=\"aligncenter size-full wp-image-1117\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1113\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1113\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/191.jpg\" alt=\"image-1113\">\r\n                   <\/div><\/a><\/p>\n<p>47. Choose Control > Test Movie<br \/>\nNow you can see pink balloons flying and at certain point getting busted. If you try to click them with the mouse they will bust and it will increase your score by 1 everytime you hit the balloon. If you miss any of them it will count as a missed balloon.<br \/>\nTo add some more interaction to the game we are going to add one more different colored balloon which will give you 5 bonus points if you hit it.<\/p>\n<p><strong>ADDING BONUS BALLOONS<\/strong><\/p>\n<p>1. Choose Window > Library > balloon movie clip<\/p>\n<p>2. In the Library window click the Options tab to open the menu and choose Duplicate...<\/p>\n<p><a name=\"imageclose-1114\"><div class=\"lb-album\"><a href=\"#image-1114\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/18.jpg\"  class=\"aligncenter size-full wp-image-1118\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1114\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1114\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/18.jpg\" alt=\"image-1114\">\r\n                   <\/div><\/a><\/p>\n<p>3. In the Duplicate Symbol type 'bonus balloon' and create a copy of balloon movie clip<\/p>\n<p><a name=\"imageclose-1115\"><div class=\"lb-album\"><a href=\"#image-1115\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/17.jpg\"  class=\"aligncenter size-full wp-image-1119\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1115\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1115\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/17.jpg\" alt=\"image-1115\">\r\n                   <\/div><\/a><\/p>\n<p>4. Similarly duplicate the balloon move movie clip and name it as 'bonus balloon move movie clip'<\/p>\n<p>5. In the Library, double click the bonus balloon movie clip to go inside it<\/p>\n<p>6. At Layer 1 in place of existing balloon create a different color balloon with dimensions slightly bigger than the first one. Here we have taken 33px.X50px.<\/p>\n<p>7. Select the hit button at Dummy Button layer and make it little bigger to match the size of the new balloon.<\/p>\n<p><a name=\"imageclose-1116\"><div class=\"lb-album\"><a href=\"#image-1116\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/16.jpg\"  class=\"aligncenter size-full wp-image-1120\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1116\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1116\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/16.jpg\" alt=\"image-1116\">\r\n                   <\/div><\/a><\/p>\n<p>8. Select the hit button and choose Window > Actions<\/p>\n<p>9. In the Actions panel make only one line change. In place of '_root.score++' type '_root.score+=5'<br \/>\n10. Select frame 3 at Layer 1 and change the color of the bust balloon<br \/>\n11. In the Library, double click the bonus balloon move movie clip to go inside it<\/p>\n<p>12. Select the balloon movie clip at frame 2<\/p>\n<p>13. In the Properties panel with the help of Swap Symbol button, swap balloon movie clip with bonus balloon movie clip<\/p>\n<p><a name=\"imageclose-1117\"><div class=\"lb-album\"><a href=\"#image-1117\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/15.jpg\"  class=\"aligncenter size-full wp-image-1121\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1117\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1117\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/15.jpg\" alt=\"image-1117\">\r\n                   <\/div><\/a><\/p>\n<p>14. Select bonus balloon movie clip and choose Window > Actions<\/p>\n<p>15. In the Actions panel delete the existing actions and type the following actions<br \/>\n<code>onClipEvent (load) {<br \/>\n \t_root.hitn = 0;<br \/>\n \tthis._alpha = 0;<br \/>\n}<br \/>\nonClipEvent (enterFrame) {<br \/>\n \tthis._y -= _root.speedn;<br \/>\n \tthis._rotation -= 5;<br \/>\n \tif (this._y<=-90) {\n \t \tthis._alpha = 100;\n \t}\t \n \tif (this._y<=-380 &#038;&#038; _root.hitn == 0) {\n \t \tgotoAndPlay(2);\n \t \t_root.missed += 1;\n \t \t_root.hitn = 1;\n \t}\t \n \tif (_root._currentframe == 3) {\n \t \t_parent.nextFrame();\n \t}\t \n}<\/code>\t \t <\/p>\n<p><a name=\"imageclose-1118\"><div class=\"lb-album\"><a href=\"#image-1118\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/14.jpg\"  class=\"aligncenter size-full wp-image-1122\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1118\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1118\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/14.jpg\" alt=\"image-1118\">\r\n                   <\/div><\/a><\/p>\n<p>\/\/ These actions are same as we have used for balloons movie clip. Only the variables are different.<br \/>\n16. Come back into Scene 1<\/p>\n<p>17. Insert a new layer above balloons layer and name it as 'Bonus Balloons'<\/p>\n<p>18. Select frame 2 and choose Insert > Keyframe<\/p>\n<p>19. Choose Window > Library > bonus balloon move movie clip<\/p>\n<p>20. Drag the bonus balloon move movie clip on the stage and place it below the stage bottom where we have placed the balloon move movie clip<br \/>\n21. In the Properties panel type the Instance Name as 'bonballoon'<\/p>\n<p><a name=\"imageclose-1119\"><div class=\"lb-album\"><a href=\"#image-1119\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/13.jpg\"  class=\"aligncenter size-full wp-image-1123\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1119\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1119\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/13.jpg\" alt=\"image-1119\">\r\n                   <\/div><\/a><\/p>\n<p>22. Choose Window > Library > trigger movie clip<\/p>\n<p>23. Drag the trigger movie clip on the stage and place it beside the bonus balloon move movie clip<\/p>\n<p>24. Choose Window > Actions<\/p>\n<p>25. In the Actions panel type the following actions<br \/>\n<code>onClipEvent (enterFrame) {<br \/>\n \tif (_root.n%_root.intervaln == 0) {<br \/>\n \t \tduplicateMovieClip(\"_root.bonballoon\", \"bonballoons\"+_root.n, _root.n);<br \/>\n \t \tsetProperty(\"_root.bonballoons\"+_root.n, _x, random(200)+50);<br \/>\n \t \ttellTarget (\"_root.bonballoons\"+_root.n) {<br \/>\n \t \t \tgotoAndPlay(2);<br \/>\n \t \t}<br \/>\n \t}<br \/>\n \t_root.n++;<br \/>\n}<\/code>\t <\/p>\n<p><a name=\"imageclose-1120\"><div class=\"lb-album\"><a href=\"#image-1120\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/12.jpg\"  class=\"aligncenter size-full wp-image-1124\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1120\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1120\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/12.jpg\" alt=\"image-1120\">\r\n                   <\/div><\/a><\/p>\n<p>\/\/ These actions are same as we have used for balloons movie clip. Only the variables are different.<br \/>\n26. Choose Control > Test Movie<br \/>\nNow you can see pink balloons flying and as well as orange (bonus) balloons flying after some interval. The orange balloons are bonus balloons so if you hit them you get 5 bonus points for each orange balloon.<br \/>\nIf you go on playing the game this game won't get over. So we need to put a timer. After certain time gets over, the game will stop. <\/p>\n<p><strong>CREATING TIMER<\/strong><\/p>\n<p>1. Choose Insert > New Symbol<\/p>\n<p>2. In Create New Symbol box type 'clock' and create a Movie Clip<\/p>\n<p>3. In the center of the stage, create a small circle of 27px.X 27px. with white color fill and green outline<\/p>\n<p>4. Insert a new layer and name it as 'Timer'<\/p>\n<p>5. Create a Dynamic text field which can contain two digits and place it in the center of the circle<\/p>\n<p>6. In the Properties panel type the variable name as '_root.time'<\/p>\n<p><a name=\"imageclose-1121\"><div class=\"lb-album\"><a href=\"#image-1121\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/11.jpg\"  class=\"aligncenter size-full wp-image-1125\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1121\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1121\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/11.jpg\" alt=\"image-1121\">\r\n                   <\/div><\/a><\/p>\n<p>7. Insert a new layer above timer layer and rename it as 'Clock Tic'<\/p>\n<p>8. Create a small clock hand, convert it into a Graphic with bottom center registration point selected and name it as 'clock hand'<\/p>\n<p>9. Place the clock hand graphic in such way that the registration point of clock hand should match with the movie clips center point.<\/p>\n<p><a name=\"imageclose-1122\"><div class=\"lb-album\"><a href=\"#image-1122\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/10.jpg\"  class=\"aligncenter size-full wp-image-1126\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1122\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1122\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/10.jpg\" alt=\"image-1122\">\r\n                   <\/div><\/a><\/p>\n<p>10. Select frame 24 on Clock Tic layer and choose Insert > Keyframe<\/p>\n<p>11. Select any frame between 1 to 24 and choose Insert > Create Motion Tween<\/p>\n<p>12. In the Properties panel set Rotation options as CW <\/p>\n<p><a name=\"imageclose-1123\"><div class=\"lb-album\"><a href=\"#image-1123\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/9.jpg\"  class=\"aligncenter size-full wp-image-1127\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1123\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1123\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/9.jpg\" alt=\"image-1123\">\r\n                   <\/div><\/a><\/p>\n<p>13. Select frame 24 on other two layers and choose Insert > Frame<\/p>\n<p>14. Insert a new layer above Clock Tic layer and name it as 'Actions'<\/p>\n<p>15. Select frame 24 and choose Insert > Keyframe<\/p>\n<p>16. At keyframe 24 assign the following action<br \/>\n_root.time--;<br \/>\n\/\/ Everytime when actionscript reaches at frame 24 the value of variable 'time' decrements by 1. So it looks like seconds countdown.<br \/>\n17. Go back into Scene 1<\/p>\n<p>18. Insert a new layer above Bonus Balloons layer and name it as 'Clock'<\/p>\n<p>19. Select frame 2 at Clock layer and choose Insert > Keyframe<\/p>\n<p>20. Choose Window > Library > clock movie clip<\/p>\n<p>21. Drag the clock movie clip on the stage and place it on the score panel<\/p>\n<p><a name=\"imageclose-1124\"><div class=\"lb-album\"><a href=\"#image-1124\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/8.jpg\"  class=\"aligncenter size-full wp-image-1128\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1124\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1124\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/8.jpg\" alt=\"image-1124\">\r\n                   <\/div><\/a><\/p>\n<p>22. Select the clock movie clip and choose Window > Actions<\/p>\n<p>23. In the Actions panel type the following actions<br \/>\n<code>onClipEvent (enterFrame) {<br \/>\n \tif (_root.time == 30) {<br \/>\n \t \t_root.speedz = 9;<br \/>\n \t \t_root.intervaln = 30;<br \/>\n \t}<br \/>\n \tif (_root.time == 10) {<br \/>\n \t \t_root.intervalz = 10;<br \/>\n \t}<br \/>\n \tif (_root.time == 0) {<br \/>\n \t \t_root.gotoAndStop(3);<br \/>\n \t}<br \/>\n}<\/code>\t \t <\/p>\n<p><a name=\"imageclose-1125\"><div class=\"lb-album\"><a href=\"#image-1125\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/7.jpg\"  class=\"aligncenter size-full wp-image-1129\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1125\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1125\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/7.jpg\" alt=\"image-1125\">\r\n                   <\/div><\/a><\/p>\n<p>\/\/ \tif (_root.time == 30) {<br \/>\n \t \t_root.speedz = 9;<br \/>\n \t \t_root.intervaln = 30;<br \/>\n \t}<br \/>\nThis condition checks whether the value of variable 'time' is perfectly equal to 30. If the condition satisfies then the value of variable 'speedz' is set to 9 to increase the speed of the balloons and the value of variable 'intervaln' is set to 30 to reduce the time span between two bonus balloons appearances.<br \/>\n \tif (_root.time == 10) {<br \/>\n \t \t_root.intervalz = 10;<br \/>\n \t}<br \/>\nThis condition checks whether the value of variable 'time' is perfectly equal to 10. If the condition satisfies then the value of variable 'intervalz' is set to 10 to reduce the time span between two balloons appearances.<br \/>\n \tif (_root.time == 0) {<br \/>\n \t \t_root.gotoAndStop(3);<br \/>\n \t}<br \/>\nThis condition checks whether the value of variable 'time' is perfectly equal to 10. If the condition satisfies then actionscript will go and stop at frame 3 in Scene 1.<\/p>\n<p><strong>CREATING GAME OVER SCENE<\/strong><\/p>\n<p>1. Insert a new layer above Clock layer and name it as 'Game Over'<\/p>\n<p>2. Select frame 3 and choose Insert > Keyframe<\/p>\n<p>3. With the help of 'Text' tool type 'GAME OVER'<\/p>\n<p><a name=\"imageclose-1126\"><div class=\"lb-album\"><a href=\"#image-1126\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/6.jpg\"  class=\"aligncenter size-full wp-image-1130\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1126\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1126\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/6.jpg\" alt=\"image-1126\">\r\n                   <\/div><\/a><\/p>\n<p>4. Select the text on the stage, convert it into a Movie Clip and name it as 'game over'<\/p>\n<p>5. Select the game over movie clip and choose Window > Actions<\/p>\n<p>6. In the Actions panel type the following actions<br \/>\n<code>onClipEvent (load) {<br \/>\n \tMouse.show();<br \/>\n}<\/code>\t <\/p>\n<p><a name=\"imageclose-1127\"><div class=\"lb-album\"><a href=\"#image-1127\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/5.jpg\"  class=\"aligncenter size-full wp-image-1131\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1127\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1127\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/5.jpg\" alt=\"image-1127\">\r\n                   <\/div><\/a><\/p>\n<p>7. Below the game over movie clip type text as 'You Scored:' and 'You Missed:' one below another<br \/>\n8. Create two Dynamic text fields to show the final scores<\/p>\n<p><a name=\"imageclose-1128\"><div class=\"lb-album\"><a href=\"#image-1128\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/4.jpg\"  class=\"aligncenter size-full wp-image-1132\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1128\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1128\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/4.jpg\" alt=\"image-1128\">\r\n                   <\/div><\/a><\/p>\n<p>9. Select the Dynamic text field for 'You Scored' and in the Properties panel type variable name as 'score'<\/p>\n<p>10. Similarly, select Dynamic text field for 'You Missed' and in the Properties panel type variable name as 'missed'<\/p>\n<p><a name=\"imageclose-1129\"><div class=\"lb-album\"><a href=\"#image-1129\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/3.jpg\"  class=\"aligncenter size-full wp-image-1133\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1129\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1129\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/3.jpg\" alt=\"image-1129\">\r\n                   <\/div><\/a><\/p>\n<p>When the game is over, there should be an option for user to play it again. So we need to create a 'Play Again' button.<br \/>\n11. Insert a new layer above Game Over layer and name it as 'Play Again'<\/p>\n<p>12. Select frame 3 and choose Insert > Keyframe<\/p>\n<p>13. With the help of 'Text' tool type 'Play Again' below the final scores<\/p>\n<p><a name=\"imageclose-1130\"><div class=\"lb-album\"><a href=\"#image-1130\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/2.jpg\"  class=\"aligncenter size-full wp-image-1134\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1130\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1130\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/2.jpg\" alt=\"image-1130\">\r\n                   <\/div><\/a><\/p>\n<p>14. Select the text, convert it into a Button and name it as 'play again'<\/p>\n<p>15. Double click the play again button to go inside it<\/p>\n<p>16. Select frame 2 at Over stage and choose Insert > Keyframe <\/p>\n<p>17. With the help of 'Fill Color' option in the 'Tools' panel change the text color to 'Red'<\/p>\n<p>18. Select frame 4 at Hit stage and choose Insert > Frame<\/p>\n<p>19. Rename the layer as 'Play Again Button'<\/p>\n<p>20. Insert a new layer above Play Again Button layer and drag it downward so that it appears below Play Again Button<\/p>\n<p>21. Select frame at 'Hit' stage and choose Insert > Keyframe<\/p>\n<p>22. Draw a rectangle patch as a 'hit area' of the button<\/p>\n<p>23. Come back into Scene 1<\/p>\n<p>24. Select the play again button on the stage and choose Window > Actions<\/p>\n<p>25. In the Actions panel type the following action<br \/>\non (release) {<br \/>\n \tgotoAndStop(2);<br \/>\n}<br \/>\n26. Select frame 3 on Actions layer and choose Insert > Keyframe<\/p>\n<p>27. Select keyframe 3 and assign the following action to it<br \/>\nstop();<br \/>\n28. Choose Control > Test Movie<br \/>\nStart playing the game. After 1 minute the game will get over. After the game is over you can see the final scores and with the help of 'Play Again' button you can restart the game.<br \/>\nTo add more interaction into the game we can create a gun target which will move with the mouse but mouse can not be seen. This can give a feel like you are aiming towards the balloon.<\/p>\n<p><strong>CREATING GUN TARGET<\/strong><\/p>\n<p>1. Choose Insert > New Symbol, create a Movie Clip and name it as 'target'<\/p>\n<p>2. Create a gun target of 22px. X 22px. as shown in the image<\/p>\n<p><a name=\"imageclose-1131\"><div class=\"lb-album\"><a href=\"#image-1131\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/1.jpg\"  class=\"aligncenter size-full wp-image-1135\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1131\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1131\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/1.jpg\" alt=\"image-1131\">\r\n                   <\/div><\/a><\/p>\n<p>3. Come back into Scene 1<\/p>\n<p>4. Insert a new layer above Play Again layer and name it as 'Target'<\/p>\n<p>5. Select frame 2 and choose Insert > Keyframe<\/p>\n<p>6. Choose Window > Library > target movie clip<\/p>\n<p>7. Drag the target movie clip on the stage and in the Properties panel type Instance Name as 'aim'<\/p>\n<p>8. Select target movie clip on the stage and choose Window > Actions<br \/>\n9. In the Actions panel type the following actions<br \/>\n<code>onClipEvent (load) {<br \/>\n \tMouse.hide();<br \/>\n}<br \/>\nonClipEvent (enterFrame) {<br \/>\n \tthis._x = _root._xmouse;<br \/>\n \tthis._y = _root._ymouse;<br \/>\n \tthis.swapDepths(_root.z+1);<br \/>\n \tif (_root._currentframe == 3) {<br \/>\n \t \tremoveMovieClip(\"\");<br \/>\n \t}<br \/>\n}<\/code>\t \t <\/p>\n<p><a name=\"imageclose-1132\"><div class=\"lb-album\"><a href=\"#image-1132\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/42.jpg\"  class=\"aligncenter size-full wp-image-1136\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1132\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1132\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/42.jpg\" alt=\"image-1132\">\r\n                   <\/div><\/a><\/p>\n<p>\/\/ this._x = _root._xmouse;<br \/>\n\/\/ this._y = _root._ymouse;<br \/>\nThese actions help the movie clip to drag with the mouse.<\/p>\n<p>\/\/ this.swapDepths(_root.z+1);<br \/>\nThis action determines Depth of the movie clip. <\/p>\n<p>10. Select frame 3 and choose Insert > Blank Keyframe<br \/>\n11. Choose Control > Test Movie and see how you can target the balloons<br \/>\nTo make this game more interactive we can add a background to the game.<\/p>\n<p><strong>GAME BACKGROUND<\/strong><br \/>\n1. Insert a new layer below the Balloon Shooter layer<\/p>\n<p>2. Choose File > Import to import a background image for the game<\/p>\n<p>3. Here we have imported 'sky.jpg' as a background image<\/p>\n<p>4. Rename the layer as 'Sky'<\/p>\n<p><a name=\"imageclose-1133\"><div class=\"lb-album\"><a href=\"#image-1133\"><img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/43.jpg\"  class=\"aligncenter size-full wp-image-1137\"><span><\/span><\/a><\/div>              \r\n<a href=\"#imageclose-1133\" class=\"css3lightbox-close\">\r\n\t\t\t\t   <div class=\"lb-overlay\" id=\"image-1133\">\r\n                   <img src=\"http:\/\/www.searchenginegenie.com\/web-design-blog\/wp-content\/uploads\/2011\/10\/43.jpg\" alt=\"image-1133\">\r\n                   <\/div><\/a><\/p>\n<p>5. Insert a new layer above the Actions layer and create a stage outline<\/p>\n<p>Baloon shooting game is ready. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>BALLOON SHOOTING Play the game and try to shoot as many balloons to collect maximum points. 1. Create a new movie with dimensions of 300px. X 400px. and fps = 24 with white color as Background Color. CREATING CLICK TO PLAY SCENE 1. Select frame 1 on Layer 1 2. Select the &#8220;TEXT&#8221; tool type [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1090","post","type-post","status-publish","format-standard","hentry","category-flash"],"_links":{"self":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/1090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/comments?post=1090"}],"version-history":[{"count":12,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/1090\/revisions"}],"predecessor-version":[{"id":1150,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/posts\/1090\/revisions\/1150"}],"wp:attachment":[{"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/media?parent=1090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/categories?post=1090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.searchenginegenie.com\/web-design-blog\/wp-json\/wp\/v2\/tags?post=1090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}