STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228138
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5122

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/45912182?noj=FRM45912182-18DC" width="1" height="1"></div>

Flash Tutor - 2.swf

This is the info page for
Flash #61272

(Click the ID number above for more basic data on this flash file.)


Text
<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"> (&quot;&quot;, </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 2
stop();
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Frame 8
Mouse.show(); stop();
Frame 9
stop();
Instance of Symbol 76 MovieClip in Frame 9
onClipEvent (load) { Mouse.hide(); startDrag ("", true); }
Frame 10
Mouse.show(); stop();
Frame 11
stop();
Frame 12
stop();
Frame 13
stop();
Frame 14
stop();
Frame 15
stop();
Frame 16
stop();
Frame 17
stop();
Frame 18
stop();
Frame 19
Mouse.show(); stop();
Frame 20
stop();
Instance of Symbol 76 MovieClip in Frame 20
onClipEvent (load) { Mouse.hide(); startDrag ("", true); }
Frame 21
Mouse.show(); stop();
Frame 22
stop();
Frame 23
stop();
Frame 24
stop();
Frame 25
Mouse.show(); stop();
Frame 26
score = 0; _root.scorebox = score; stop();
Instance of Symbol 76 MovieClip in Frame 26
onClipEvent (load) { Mouse.hide(); startDrag ("", true); }
Frame 27
stop();
Frame 28
stop();
Frame 29
stop();
Frame 30
Mouse.show(); stop();
Symbol 15 Button
on (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 2
gotoAndPlay (1);
Symbol 36 Button
on (release) { nextFrame(); }
Symbol 40 Button
on (release) { prevFrame(); }
Symbol 72 MovieClip Frame 1
stop();
Symbol 74 Button
on (rollOver) { tellTarget ("text1") { play(); }; }
Symbol 115 Button
on (release) { play(); }
Symbol 118 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 4
stop();
Symbol 120 Button
on (release) { play(); }
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 4
stop();
Symbol 125 Button
on (release) { play(); }
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 4
stop();
Symbol 151 Button
on (release) { play(); }
Symbol 154 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 4
_root.score = _root.score + 5; _root.scorebox = _root.score; stop();
Symbol 155 Button
on (release) { play(); }
Symbol 158 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 4
_root.score = _root.score + 10; _root.scorebox = _root.score; stop();
Symbol 159 Button
on (release) { play(); }
Symbol 162 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 4
_root.score = _root.score + 15; _root.scorebox = _root.score; stop();
Symbol 175 Button
on (release) { getURL ("http://www.freewebs.com/uhh_nonsense/session2.fla", "_blank"); }
Symbol 182 Button
on (release) { gotoAndPlay (2); }

Library Items

Symbol 1 FontUsed by:2 64 98 112 133 138
Symbol 2 EditableTextUses:1Used by:Timeline
Symbol 3 FontUsed by:5
Symbol 4 FontUsed by:5
Symbol 5 TextUses:3 4Used by:Timeline
Symbol 6 GraphicUsed by:16
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClipUses:7Used by:16
Symbol 9 GraphicUsed by:16
Symbol 10 GraphicUsed by:16
Symbol 11 GraphicUsed by:15
Symbol 12 FontUsed by:13 14 30 38 39 42 46 173 174
Symbol 13 TextUses:12Used by:15
Symbol 14 TextUses:12Used by:15
Symbol 15 ButtonUses:11 13 14Used by:16
Symbol 16 MovieClipUses:6 8 9 10 15Used by:Timeline
Symbol 17 GraphicUsed by:23  Timeline
Symbol 18 GraphicUsed by:22
Symbol 19 GraphicUsed by:22
Symbol 20 GraphicUsed by:22
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClipUses:18 19 20 21Used by:23  Timeline
Symbol 23 MovieClipUses:17 22Used by:Timeline
Symbol 24 BitmapUsed by:25 26
Symbol 25 GraphicUses:24Used by:Timeline
Symbol 26 GraphicUses:24Used by:Timeline
Symbol 27 GraphicUsed by:Timeline
Symbol 28 FontUsed 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 FontUsed by:30 50 54 58 68 84 88 96 102 104 108 110 114 136 142 150 173 174 177
Symbol 30 TextUses:28 29 12Used by:Timeline
Symbol 31 GraphicUsed by:Timeline
Symbol 32 GraphicUsed by:36
Symbol 33 FontUsed by:34 35
Symbol 34 TextUses:33Used by:36
Symbol 35 TextUses:33Used by:36
Symbol 36 ButtonUses:32 34 35Used by:Timeline
Symbol 37 GraphicUsed by:40 175
Symbol 38 TextUses:12Used by:40
Symbol 39 TextUses:12Used by:40
Symbol 40 ButtonUses:37 38 39Used by:Timeline
Symbol 41 GraphicUsed by:Timeline
Symbol 42 TextUses:28 12Used by:Timeline
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:Timeline
Symbol 45 GraphicUsed by:Timeline
Symbol 46 TextUses:28 12Used by:Timeline
Symbol 47 BitmapUsed by:48
Symbol 48 GraphicUses:47Used by:Timeline
Symbol 49 GraphicUsed by:Timeline
Symbol 50 TextUses:28 29Used by:Timeline
Symbol 51 BitmapUsed by:52
Symbol 52 GraphicUses:51Used by:Timeline
Symbol 53 GraphicUsed by:Timeline
Symbol 54 TextUses:28 29Used by:Timeline
Symbol 55 BitmapUsed by:56 109
Symbol 56 GraphicUses:55Used by:Timeline
Symbol 57 GraphicUsed by:Timeline
Symbol 58 TextUses:28 29Used by:Timeline
Symbol 59 BitmapUsed by:60 97 137
Symbol 60 GraphicUses:59Used by:Timeline
Symbol 61 FontUsed by:62 100 113 134 139 140 164
Symbol 62 TextUses:61Used by:Timeline
Symbol 63 GraphicUsed by:Timeline
Symbol 64 EditableTextUses:1Used by:Timeline
Symbol 65 FontUsed by:66 83 106 163
Symbol 66 TextUses:65Used by:Timeline
Symbol 67 GraphicUsed by:Timeline
Symbol 68 TextUses:28 29Used by:Timeline
Symbol 69 GraphicUsed by:Timeline
Symbol 70 TextUses:28Used by:72
Symbol 71 TextUses:28Used by:72
Symbol 72 MovieClipUses:70 71Used by:Timeline
Symbol 73 GraphicUsed by:74
Symbol 74 ButtonUses:73Used by:Timeline
Symbol 75 GraphicUsed by:76
Symbol 76 MovieClipUses:75Used by:Timeline
Symbol 77 GraphicUsed by:Timeline
Symbol 78 TextUses:28Used by:Timeline
Symbol 79 GraphicUsed by:Timeline
Symbol 80 GraphicUsed by:Timeline
Symbol 81 TextUses:28Used by:Timeline
Symbol 82 GraphicUsed by:Timeline
Symbol 83 TextUses:65Used by:94 115 120 125 151 155 159  Timeline
Symbol 84 TextUses:28 29Used by:Timeline
Symbol 85 BitmapUsed by:86 105
Symbol 86 GraphicUses:85Used by:Timeline
Symbol 87 GraphicUsed by:Timeline
Symbol 88 TextUses:28 29Used by:Timeline
Symbol 89 BitmapUsed by:90 97 103 105 109 137
Symbol 90 GraphicUses:89Used by:Timeline
Symbol 91 GraphicUsed by:94 115 151
Symbol 92 GraphicUsed by:94
Symbol 93 GraphicUsed by:94
Symbol 94 MovieClipUses:91 83 92 93Used by:Timeline
Symbol 95 GraphicUsed by:Timeline
Symbol 96 TextUses:28 29Used by:Timeline
Symbol 97 GraphicUses:59 89Used by:Timeline
Symbol 98 EditableTextUses:1Used by:Timeline
Symbol 99 GraphicUsed by:Timeline
Symbol 100 TextUses:61Used by:Timeline
Symbol 101 GraphicUsed by:Timeline
Symbol 102 TextUses:28 29Used by:Timeline
Symbol 103 GraphicUses:89Used by:Timeline
Symbol 104 TextUses:28 29Used by:Timeline
Symbol 105 GraphicUses:85 89Used by:Timeline
Symbol 106 TextUses:65Used by:Timeline
Symbol 107 GraphicUsed by:Timeline
Symbol 108 TextUses:28 29Used by:Timeline
Symbol 109 GraphicUses:55 89Used by:Timeline
Symbol 110 TextUses:28 29Used by:Timeline
Symbol 111 GraphicUsed by:Timeline
Symbol 112 EditableTextUses:1Used by:Timeline
Symbol 113 TextUses:61Used by:Timeline
Symbol 114 TextUses:28 29Used by:Timeline
Symbol 115 ButtonUses:91 83Used by:118
Symbol 116 GraphicUsed by:118
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClipUses:115 116 117Used by:Timeline
Symbol 119 GraphicUsed by:120 155
Symbol 120 ButtonUses:119 83Used by:123
Symbol 121 GraphicUsed by:123
Symbol 122 GraphicUsed by:123
Symbol 123 MovieClipUses:120 121 122Used by:Timeline
Symbol 124 GraphicUsed by:125 159
Symbol 125 ButtonUses:124 83Used by:128
Symbol 126 GraphicUsed by:128
Symbol 127 GraphicUsed by:128
Symbol 128 MovieClipUses:125 126 127Used by:Timeline
Symbol 129 GraphicUsed by:Timeline
Symbol 130 TextUses:28Used by:Timeline
Symbol 131 GraphicUsed by:Timeline
Symbol 132 TextUses:28Used by:Timeline
Symbol 133 EditableTextUses:1Used by:Timeline
Symbol 134 TextUses:61Used by:Timeline
Symbol 135 GraphicUsed by:Timeline
Symbol 136 TextUses:28 29Used by:Timeline
Symbol 137 GraphicUses:59 89Used by:Timeline
Symbol 138 EditableTextUses:1Used by:Timeline
Symbol 139 TextUses:61Used by:Timeline
Symbol 140 TextUses:61Used by:Timeline
Symbol 141 GraphicUsed by:Timeline
Symbol 142 TextUses:28 29Used by:Timeline
Symbol 143 BitmapUsed by:144
Symbol 144 GraphicUses:143Used by:Timeline
Symbol 145 GraphicUsed by:Timeline
Symbol 146 TextUses:28Used by:Timeline
Symbol 147 BitmapUsed by:148
Symbol 148 GraphicUses:147Used by:Timeline
Symbol 149 GraphicUsed by:Timeline
Symbol 150 TextUses:28 29Used by:Timeline
Symbol 151 ButtonUses:91 83Used by:154
Symbol 152 GraphicUsed by:154
Symbol 153 GraphicUsed by:154
Symbol 154 MovieClipUses:151 152 153Used by:Timeline
Symbol 155 ButtonUses:119 83Used by:158
Symbol 156 GraphicUsed by:158
Symbol 157 GraphicUsed by:158
Symbol 158 MovieClipUses:155 156 157Used by:Timeline
Symbol 159 ButtonUses:124 83Used by:162
Symbol 160 GraphicUsed by:162
Symbol 161 GraphicUsed by:162
Symbol 162 MovieClipUses:159 160 161Used by:Timeline
Symbol 163 EditableTextUses:65Used by:Timeline
Symbol 164 EditableTextUses:61Used by:Timeline
Symbol 165 GraphicUsed by:Timeline
Symbol 166 TextUses:28Used by:Timeline
Symbol 167 GraphicUsed by:Timeline
Symbol 168 TextUses:28Used by:Timeline
Symbol 169 GraphicUsed by:Timeline
Symbol 170 TextUses:28Used by:Timeline
Symbol 171 GraphicUsed by:Timeline
Symbol 172 TextUses:28Used by:Timeline
Symbol 173 TextUses:12 29Used by:175
Symbol 174 TextUses:12 29Used by:175
Symbol 175 ButtonUses:37 173 174Used by:Timeline
Symbol 176 GraphicUsed by:Timeline
Symbol 177 TextUses:28 29Used by:Timeline
Symbol 178 GraphicUsed by:182
Symbol 179 FontUsed by:180 181
Symbol 180 TextUses:179Used by:182
Symbol 181 TextUses:179Used by:182
Symbol 182 ButtonUses:178 180 181Used by:Timeline

Instance Names

"text1"Frame 9Symbol 72 MovieClip
"bar"Symbol 16 MovieClip Frame 1Symbol 8 MovieClip

Labels

"loaded"Symbol 16 MovieClip Frame 3

Dynamic Text Variables

scoreboxSymbol 163 EditableText"0"
TextField1Symbol 164 EditableText"Score:"




http://swfchan.com/13/61272/info.shtml
Created: 15/4 -2019 16:17:04 Last modified: 15/4 -2019 16:17:04 Server time: 18/05 -2024 04:54:43