STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229595 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2595 · P5190 |
This is the info page for Flash #61272 |
<P ALIGN="RIGHT"><FONT FACE="Times New Roman" SIZE="8" COLOR="#FF0000">* Also applicable for higher versions of Macromedia Flash(tm)</FONT></P> |
Session 2: Gun Games |
Begin |
Begin |
Welcome to Macromedia Flash Tutor! I'm your personal tutor, the Professor! |
NEXT |
NEXT |
BACK |
BACK |
Today, I will teach you how to make a basic Gun Game. |
Start by drawing a crosshair. |
Highlight the crosshair, go to Insert, and select Convert to Symbol. |
In the symbol properties, name the symbol crosshair and choose Movie Clip for the behavior. |
Right-click on the Movie Clip and select Actions. *Flash MX: Click on the Actions Tab. |
This will hide the mouse and drag the crosshair, like a cursor. |
<P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">onClipEvent<FONT COLOR="#000000"> (</FONT>load<FONT COLOR="#000000">) {</FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">Mouse.hide<FONT COLOR="#000000">();</FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">startDrag<FONT COLOR="#000000"> ("", </FONT>true<FONT COLOR="#000000">);</FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#000000">}</FONT></P><P ALIGN="LEFT"></P> |
Highlight, copy and paste. |
Paste this in the Object Actions window. |
Take a small break and run your game. You should get something like this. |
Don't shoot! Haha |
Next, create an object to shoot. |
Doesn't have to be too amazing. I'll draw a couple of bottles. |
XXX |
Change each bottle into a Symbol. |
Choose Movie Clip. Name the symbols bottle1, 2, 3. |
Create an animation of the bottle shattering for each Movie Clip with an empty frame at the end. |
<P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">stop<FONT COLOR="#000000"> ();</FONT></FONT></P><P ALIGN="LEFT"></P> |
This tells the Movie Clip to stop until prompted otherwise. |
Add the stop script to the first and last frame of all the Movie Clips. |
Highlight the object in the first frame and convert it into a Symbol. |
bottle1-button |
This time, choose Button instead of Movie Clip. |
Right-click on the Button and select Actions. |
<P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">on<FONT COLOR="#000000"> (</FONT>release<FONT COLOR="#000000">) {</FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">play<FONT COLOR="#000000"> ();</FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#000000">}</FONT></P> |
This will make the Movie Clip play when the button is pressed. |
Paste this in the Object Actions window. |
And there you have it, a basic gun game. Wait, this tutorial isn't over yet! |
Let's add a score system now. |
<P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#000000">score=0;</FONT></P> |
This declares a variable named score with the value of 0. |
Go to the first frame of the Scene and paste this. |
<P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">_root.<FONT COLOR="#000000">score = </FONT>_root.<FONT COLOR="#000000">score+5;</FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">_root.<FONT COLOR="#000000">scorebox = </FONT>_root.<FONT COLOR="#000000">score;</FONT></FONT></P><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="13" COLOR="#0000EF">stop <FONT COLOR="#000000">();</FONT></FONT></P><P ALIGN="LEFT"></P> |
This adds 5 to the value of score and sets the value of "scorebox" to the value of score. |
(scorebox will be created soon.) |
Next, go to the last frame of each bottle Movie Clip and paste this. |
Go to the main scene where the bottles are and create a text box. |
Select dynamic text and enter scorebox for the variable. |
0 |
Score: |
And there you have it! A gun game! |
You can add things like different scores for different bottles... |
Or mobile enemies. |
Experiment. |
Too Stupid To Understand? Download this: session2.fla |
Too Stupid To Understand? Download this: session2.fla |
Thank you for viewing Macromedia Flash Tutor! I hope you learned something! |
Replay |
Replay |
ActionScript [AS1/AS2]
Frame 2stop();Frame 3stop();Frame 4stop();Frame 5stop();Frame 6stop();Frame 7stop();Frame 8Mouse.show(); stop();Frame 9stop();Instance of Symbol 76 MovieClip in Frame 9onClipEvent (load) { Mouse.hide(); startDrag ("", true); }Frame 10Mouse.show(); stop();Frame 11stop();Frame 12stop();Frame 13stop();Frame 14stop();Frame 15stop();Frame 16stop();Frame 17stop();Frame 18stop();Frame 19Mouse.show(); stop();Frame 20stop();Instance of Symbol 76 MovieClip in Frame 20onClipEvent (load) { Mouse.hide(); startDrag ("", true); }Frame 21Mouse.show(); stop();Frame 22stop();Frame 23stop();Frame 24stop();Frame 25Mouse.show(); stop();Frame 26score = 0; _root.scorebox = score; stop();Instance of Symbol 76 MovieClip in Frame 26onClipEvent (load) { Mouse.hide(); startDrag ("", true); }Frame 27stop();Frame 28stop();Frame 29stop();Frame 30Mouse.show(); stop();Symbol 15 Buttonon (release) { _root.play(); }Symbol 16 MovieClip Frame 1_root.stop(); PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; if (PercentLoaded != 100) { setProperty(bar, _xscale , PercentLoaded); } else { gotoAndStop (3); }Symbol 16 MovieClip Frame 2gotoAndPlay (1);Symbol 36 Buttonon (release) { nextFrame(); }Symbol 40 Buttonon (release) { prevFrame(); }Symbol 72 MovieClip Frame 1stop();Symbol 74 Buttonon (rollOver) { tellTarget ("text1") { play(); }; }Symbol 115 Buttonon (release) { play(); }Symbol 118 MovieClip Frame 1stop();Symbol 118 MovieClip Frame 4stop();Symbol 120 Buttonon (release) { play(); }Symbol 123 MovieClip Frame 1stop();Symbol 123 MovieClip Frame 4stop();Symbol 125 Buttonon (release) { play(); }Symbol 128 MovieClip Frame 1stop();Symbol 128 MovieClip Frame 4stop();Symbol 151 Buttonon (release) { play(); }Symbol 154 MovieClip Frame 1stop();Symbol 154 MovieClip Frame 4_root.score = _root.score + 5; _root.scorebox = _root.score; stop();Symbol 155 Buttonon (release) { play(); }Symbol 158 MovieClip Frame 1stop();Symbol 158 MovieClip Frame 4_root.score = _root.score + 10; _root.scorebox = _root.score; stop();Symbol 159 Buttonon (release) { play(); }Symbol 162 MovieClip Frame 1stop();Symbol 162 MovieClip Frame 4_root.score = _root.score + 15; _root.scorebox = _root.score; stop();Symbol 175 Buttonon (release) { getURL ("http://www.freewebs.com/uhh_nonsense/session2.fla", "_blank"); }Symbol 182 Buttonon (release) { gotoAndPlay (2); }
Library Items
Symbol 1 Font | Used by:2 64 98 112 133 138 | ||
Symbol 2 EditableText | Uses:1 | Used by:Timeline | |
Symbol 3 Font | Used by:5 | ||
Symbol 4 Font | Used by:5 | ||
Symbol 5 Text | Uses:3 4 | Used by:Timeline | |
Symbol 6 Graphic | Used by:16 | ||
Symbol 7 Graphic | Used by:8 | ||
Symbol 8 MovieClip | Uses:7 | Used by:16 | |
Symbol 9 Graphic | Used by:16 | ||
Symbol 10 Graphic | Used by:16 | ||
Symbol 11 Graphic | Used by:15 | ||
Symbol 12 Font | Used by:13 14 30 38 39 42 46 173 174 | ||
Symbol 13 Text | Uses:12 | Used by:15 | |
Symbol 14 Text | Uses:12 | Used by:15 | |
Symbol 15 Button | Uses:11 13 14 | Used by:16 | |
Symbol 16 MovieClip | Uses:6 8 9 10 15 | Used by:Timeline | |
Symbol 17 Graphic | Used by:23 Timeline | ||
Symbol 18 Graphic | Used by:22 | ||
Symbol 19 Graphic | Used by:22 | ||
Symbol 20 Graphic | Used by:22 | ||
Symbol 21 Graphic | Used by:22 | ||
Symbol 22 MovieClip | Uses:18 19 20 21 | Used by:23 Timeline | |
Symbol 23 MovieClip | Uses:17 22 | Used by:Timeline | |
Symbol 24 Bitmap | Used by:25 26 | ||
Symbol 25 Graphic | Uses:24 | Used by:Timeline | |
Symbol 26 Graphic | Uses:24 | Used by:Timeline | |
Symbol 27 Graphic | Used by:Timeline | ||
Symbol 28 Font | Used by:30 42 46 50 54 58 68 70 71 78 81 84 88 96 102 104 108 110 114 130 132 136 142 146 150 166 168 170 172 177 | ||
Symbol 29 Font | Used by:30 50 54 58 68 84 88 96 102 104 108 110 114 136 142 150 173 174 177 | ||
Symbol 30 Text | Uses:28 29 12 | Used by:Timeline | |
Symbol 31 Graphic | Used by:Timeline | ||
Symbol 32 Graphic | Used by:36 | ||
Symbol 33 Font | Used by:34 35 | ||
Symbol 34 Text | Uses:33 | Used by:36 | |
Symbol 35 Text | Uses:33 | Used by:36 | |
Symbol 36 Button | Uses:32 34 35 | Used by:Timeline | |
Symbol 37 Graphic | Used by:40 175 | ||
Symbol 38 Text | Uses:12 | Used by:40 | |
Symbol 39 Text | Uses:12 | Used by:40 | |
Symbol 40 Button | Uses:37 38 39 | Used by:Timeline | |
Symbol 41 Graphic | Used by:Timeline | ||
Symbol 42 Text | Uses:28 12 | Used by:Timeline | |
Symbol 43 Bitmap | Used by:44 | ||
Symbol 44 Graphic | Uses:43 | Used by:Timeline | |
Symbol 45 Graphic | Used by:Timeline | ||
Symbol 46 Text | Uses:28 12 | Used by:Timeline | |
Symbol 47 Bitmap | Used by:48 | ||
Symbol 48 Graphic | Uses:47 | Used by:Timeline | |
Symbol 49 Graphic | Used by:Timeline | ||
Symbol 50 Text | Uses:28 29 | Used by:Timeline | |
Symbol 51 Bitmap | Used by:52 | ||
Symbol 52 Graphic | Uses:51 | Used by:Timeline | |
Symbol 53 Graphic | Used by:Timeline | ||
Symbol 54 Text | Uses:28 29 | Used by:Timeline | |
Symbol 55 Bitmap | Used by:56 109 | ||
Symbol 56 Graphic | Uses:55 | Used by:Timeline | |
Symbol 57 Graphic | Used by:Timeline | ||
Symbol 58 Text | Uses:28 29 | Used by:Timeline | |
Symbol 59 Bitmap | Used by:60 97 137 | ||
Symbol 60 Graphic | Uses:59 | Used by:Timeline | |
Symbol 61 Font | Used by:62 100 113 134 139 140 164 | ||
Symbol 62 Text | Uses:61 | Used by:Timeline | |
Symbol 63 Graphic | Used by:Timeline | ||
Symbol 64 EditableText | Uses:1 | Used by:Timeline | |
Symbol 65 Font | Used by:66 83 106 163 | ||
Symbol 66 Text | Uses:65 | Used by:Timeline | |
Symbol 67 Graphic | Used by:Timeline | ||
Symbol 68 Text | Uses:28 29 | Used by:Timeline | |
Symbol 69 Graphic | Used by:Timeline | ||
Symbol 70 Text | Uses:28 | Used by:72 | |
Symbol 71 Text | Uses:28 | Used by:72 | |
Symbol 72 MovieClip | Uses:70 71 | Used by:Timeline | |
Symbol 73 Graphic | Used by:74 | ||
Symbol 74 Button | Uses:73 | Used by:Timeline | |
Symbol 75 Graphic | Used by:76 | ||
Symbol 76 MovieClip | Uses:75 | Used by:Timeline | |
Symbol 77 Graphic | Used by:Timeline | ||
Symbol 78 Text | Uses:28 | Used by:Timeline | |
Symbol 79 Graphic | Used by:Timeline | ||
Symbol 80 Graphic | Used by:Timeline | ||
Symbol 81 Text | Uses:28 | Used by:Timeline | |
Symbol 82 Graphic | Used by:Timeline | ||
Symbol 83 Text | Uses:65 | Used by:94 115 120 125 151 155 159 Timeline | |
Symbol 84 Text | Uses:28 29 | Used by:Timeline | |
Symbol 85 Bitmap | Used by:86 105 | ||
Symbol 86 Graphic | Uses:85 | Used by:Timeline | |
Symbol 87 Graphic | Used by:Timeline | ||
Symbol 88 Text | Uses:28 29 | Used by:Timeline | |
Symbol 89 Bitmap | Used by:90 97 103 105 109 137 | ||
Symbol 90 Graphic | Uses:89 | Used by:Timeline | |
Symbol 91 Graphic | Used by:94 115 151 | ||
Symbol 92 Graphic | Used by:94 | ||
Symbol 93 Graphic | Used by:94 | ||
Symbol 94 MovieClip | Uses:91 83 92 93 | Used by:Timeline | |
Symbol 95 Graphic | Used by:Timeline | ||
Symbol 96 Text | Uses:28 29 | Used by:Timeline | |
Symbol 97 Graphic | Uses:59 89 | Used by:Timeline | |
Symbol 98 EditableText | Uses:1 | Used by:Timeline | |
Symbol 99 Graphic | Used by:Timeline | ||
Symbol 100 Text | Uses:61 | Used by:Timeline | |
Symbol 101 Graphic | Used by:Timeline | ||
Symbol 102 Text | Uses:28 29 | Used by:Timeline | |
Symbol 103 Graphic | Uses:89 | Used by:Timeline | |
Symbol 104 Text | Uses:28 29 | Used by:Timeline | |
Symbol 105 Graphic | Uses:85 89 | Used by:Timeline | |
Symbol 106 Text | Uses:65 | Used by:Timeline | |
Symbol 107 Graphic | Used by:Timeline | ||
Symbol 108 Text | Uses:28 29 | Used by:Timeline | |
Symbol 109 Graphic | Uses:55 89 | Used by:Timeline | |
Symbol 110 Text | Uses:28 29 | Used by:Timeline | |
Symbol 111 Graphic | Used by:Timeline | ||
Symbol 112 EditableText | Uses:1 | Used by:Timeline | |
Symbol 113 Text | Uses:61 | Used by:Timeline | |
Symbol 114 Text | Uses:28 29 | Used by:Timeline | |
Symbol 115 Button | Uses:91 83 | Used by:118 | |
Symbol 116 Graphic | Used by:118 | ||
Symbol 117 Graphic | Used by:118 | ||
Symbol 118 MovieClip | Uses:115 116 117 | Used by:Timeline | |
Symbol 119 Graphic | Used by:120 155 | ||
Symbol 120 Button | Uses:119 83 | Used by:123 | |
Symbol 121 Graphic | Used by:123 | ||
Symbol 122 Graphic | Used by:123 | ||
Symbol 123 MovieClip | Uses:120 121 122 | Used by:Timeline | |
Symbol 124 Graphic | Used by:125 159 | ||
Symbol 125 Button | Uses:124 83 | Used by:128 | |
Symbol 126 Graphic | Used by:128 | ||
Symbol 127 Graphic | Used by:128 | ||
Symbol 128 MovieClip | Uses:125 126 127 | Used by:Timeline | |
Symbol 129 Graphic | Used by:Timeline | ||
Symbol 130 Text | Uses:28 | Used by:Timeline | |
Symbol 131 Graphic | Used by:Timeline | ||
Symbol 132 Text | Uses:28 | Used by:Timeline | |
Symbol 133 EditableText | Uses:1 | Used by:Timeline | |
Symbol 134 Text | Uses:61 | Used by:Timeline | |
Symbol 135 Graphic | Used by:Timeline | ||
Symbol 136 Text | Uses:28 29 | Used by:Timeline | |
Symbol 137 Graphic | Uses:59 89 | Used by:Timeline | |
Symbol 138 EditableText | Uses:1 | Used by:Timeline | |
Symbol 139 Text | Uses:61 | Used by:Timeline | |
Symbol 140 Text | Uses:61 | Used by:Timeline | |
Symbol 141 Graphic | Used by:Timeline | ||
Symbol 142 Text | Uses:28 29 | Used by:Timeline | |
Symbol 143 Bitmap | Used by:144 | ||
Symbol 144 Graphic | Uses:143 | Used by:Timeline | |
Symbol 145 Graphic | Used by:Timeline | ||
Symbol 146 Text | Uses:28 | Used by:Timeline | |
Symbol 147 Bitmap | Used by:148 | ||
Symbol 148 Graphic | Uses:147 | Used by:Timeline | |
Symbol 149 Graphic | Used by:Timeline | ||
Symbol 150 Text | Uses:28 29 | Used by:Timeline | |
Symbol 151 Button | Uses:91 83 | Used by:154 | |
Symbol 152 Graphic | Used by:154 | ||
Symbol 153 Graphic | Used by:154 | ||
Symbol 154 MovieClip | Uses:151 152 153 | Used by:Timeline | |
Symbol 155 Button | Uses:119 83 | Used by:158 | |
Symbol 156 Graphic | Used by:158 | ||
Symbol 157 Graphic | Used by:158 | ||
Symbol 158 MovieClip | Uses:155 156 157 | Used by:Timeline | |
Symbol 159 Button | Uses:124 83 | Used by:162 | |
Symbol 160 Graphic | Used by:162 | ||
Symbol 161 Graphic | Used by:162 | ||
Symbol 162 MovieClip | Uses:159 160 161 | Used by:Timeline | |
Symbol 163 EditableText | Uses:65 | Used by:Timeline | |
Symbol 164 EditableText | Uses:61 | Used by:Timeline | |
Symbol 165 Graphic | Used by:Timeline | ||
Symbol 166 Text | Uses:28 | Used by:Timeline | |
Symbol 167 Graphic | Used by:Timeline | ||
Symbol 168 Text | Uses:28 | Used by:Timeline | |
Symbol 169 Graphic | Used by:Timeline | ||
Symbol 170 Text | Uses:28 | Used by:Timeline | |
Symbol 171 Graphic | Used by:Timeline | ||
Symbol 172 Text | Uses:28 | Used by:Timeline | |
Symbol 173 Text | Uses:12 29 | Used by:175 | |
Symbol 174 Text | Uses:12 29 | Used by:175 | |
Symbol 175 Button | Uses:37 173 174 | Used by:Timeline | |
Symbol 176 Graphic | Used by:Timeline | ||
Symbol 177 Text | Uses:28 29 | Used by:Timeline | |
Symbol 178 Graphic | Used by:182 | ||
Symbol 179 Font | Used by:180 181 | ||
Symbol 180 Text | Uses:179 | Used by:182 | |
Symbol 181 Text | Uses:179 | Used by:182 | |
Symbol 182 Button | Uses:178 180 181 | Used by:Timeline |
Instance Names
"text1" | Frame 9 | Symbol 72 MovieClip |
"bar" | Symbol 16 MovieClip Frame 1 | Symbol 8 MovieClip |
Labels
"loaded" | Symbol 16 MovieClip Frame 3 |
Dynamic Text Variables
scorebox | Symbol 163 EditableText | "0" |
TextField1 | Symbol 164 EditableText | "Score:" |
|