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

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

How to Make Buttons.swf

This is the info page for
Flash #27055

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


Text
made for Albinoblacksheep.com

Legal stuff:
All of the characters
in this tutorial
are copyrited to
the author, Thor.

The first step of making a button is to draw out the button.

...something as simple as a circle
(with a funky gradient)

...or a maze for use in a
steady-hand game.
(be sure to use the eraser
for the course)

Now highlight the object and select modify > convert to symbol
(or hit f8)

note: you can also make a button
from scratch just by hitting [ctrl]+[f8]

Double click the newly converted symbol, or right click it
and select "edit"

This is what should be in the timeline. Add 3 keyframes
so that it looks like this down here:

The button has 4 stages:

The mouse pointer is not on top or not
pressing down; the default state

UP

OVER

DOWN

HIT

The mouse pointer is hovering on top of the button

The mouse button is clicked while on top of the
button

The hit area, or the area that the mouse button can
be pressed down upon. Don't worry about the visual
for this too much; you cant' see it anyways.

Keep in mind that you don't have to change the appearance of
the button in each state (espcially for any sort of steady hand
maze), but sometimes it does make the button look better.

Up

Over

Down

Hit

Pat yourself on the back; you just made a button.

Now, let's add some simple coding.

Go to the actions window of the button

Now I know all you people with something other than
Flash 5 will be shouting "OH MAH GAD THE INTARFASE
IZ DIFFURUNT!".

But that's not the point. It's the fundamentals that count.
And those fundamentals that count the most and remain
the same, reguardless of your version of Flash
Now back to the lesson

The coding you see right here is telling the Flash:
"When the mouse button is released over this button,
change the go and play frame 1."

Pretty simple, huh?

However, you can change the coding around to suit your liking:

on ([mouse action])
{    gotoAndPlay ("[Scene]", [frame number]);
}

And there are a boat load of othercommands you can
put inside of it; just look around the sidebar to see what
you can drag in. Here are some examples:

on (release) {
getURL ("[url goes here]");
}

on (release) {
stop ();
}

Bamf. You've just made a button WITH coding on it!

...now, let's get

FANCY

We're going to put an animation on a button now.
Draw something, anything, then convert it to a button.

I invoke the help of my character Ball Man for this part.

Alright, now instead of just changing colors for the instance
for each state, we can place a movie clip within the button.

For this one, the movie clip is inside the "over" state.

Now, you'd think that, if you want an animation played on the
button AFTER the button is pressed, you'd put another movie clip
on the "down" and "hit" state.

The reason why it won't continue playing after you press it
is because Flash doesn't have the right command to do so.

Flash is being told:
"Play this movie clip when the button is in the down or hit state".
Like I said before, you can't see the hit state, and the mouse button
has to be down and kept down
in order for it to continually be in the hit state.

So how can we do it?

Get your button from before that has its
movie clip on the "over" state.

now hit [F8] and convert the button into a movie clip.

Now inside this movie clip, have the button occupy its own
keyframe. Make a new blank layer and add the "stop ()" action
in the layer itself.

Go back over the keyframe with the button and hit [F6].
This should generate another keyframe on the timeline
with the button in it.

Now, go to frame 2 and select the button.

Break it apart by hitting [CTRL]+[B]

Now, for every part you want to animate,
put it on a different layer.

This guy
is from one
of my older,
never completed
games called
"Easter Egg Hunt!"

Messy messy messy....

Go back to frame 1 and highlight the button and go to its actions

Drag the "Go To" action inside and change it around so that
it looks like this:

You'd want the "press" option instead of the
"release" option because you want this
to imitate the "down" state of the button.
Now go to the last frame and add the "stop ()"
command if you don't want the movie clip to
loop back to the beginning.

and Bam. You've got your own fully animated button.

So why can't you do this on the main timeline itself?
Why bother going through the entire process of making
movie clips?

Well, by all means, if you're only going to have
one thing happening, then go ahead and make this whole thing
on the timeline.

However, let's say you're making a shooting game. Putting
this in an MC is much easier, as you can drag it out from the
library into the main work area without having to worry
about messing with the sequence of another one.

And it's a heckuva lot neater.

So there you go. That's the lesson.

Made by Thor, Clod of Blunders
(a.k.a. Jerry Chan)

Thanks to
third-core.org
and
Albinoblacksheep.com

ActionScript [AS1/AS2]

Frame 1
stop();
Frame 2
stop();
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Frame 8
stop();
Frame 9
stop();
Frame 10
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
stop();
Frame 20
stop();
Frame 21
stop();
Frame 22
stop();
Frame 23
stop();
Frame 24
stop();
Frame 25
stop();
Frame 26
stop();
Frame 27
gotoAndPlay (27);
Frame 107
gotoAndPlay (27);
Symbol 6 Button
on (release) { gotoAndStop (2); }
Symbol 14 Button
on (release) { gotoAndStop (3); }
Symbol 19 Button
on (release) { gotoAndStop (1); }
Symbol 30 Button
on (release) { gotoAndStop (4); }
Symbol 31 Button
on (release) { gotoAndStop (2); }
Symbol 38 Button
on (release) { gotoAndStop (5); }
Symbol 39 Button
on (release) { gotoAndStop (3); }
Symbol 49 Button
on (release) { gotoAndStop (6); }
Symbol 50 Button
on (release) { gotoAndStop (4); }
Symbol 58 Button
on (release) { gotoAndStop (7); }
Symbol 59 Button
on (release) { gotoAndStop (5); }
Symbol 62 Button
on (release) { gotoAndStop (8); }
Symbol 63 Button
on (release) { gotoAndStop (6); }
Symbol 67 Button
on (release) { gotoAndStop (7); }
Symbol 68 Button
on (release) { gotoAndStop (9); }
Symbol 69 Button
on (release) { gotoAndPlay (9); }
Symbol 72 Button
on (release) { gotoAndStop (8); }
Symbol 73 Button
on (release) { gotoAndStop (10); }
Symbol 75 Button
on (release) { gotoAndStop (11); }
Symbol 76 Button
on (release) { gotoAndStop (9); }
Symbol 77 Button
on (release) { gotoAndStop (12); }
Symbol 78 Button
on (release) { gotoAndStop (10); }
Symbol 83 Button
on (release) { gotoAndStop (13); }
Symbol 84 Button
on (release) { gotoAndStop (11); }
Symbol 87 Button
on (release) { gotoAndStop (14); }
Symbol 88 Button
on (release) { gotoAndStop (12); }
Symbol 93 Button
on (release) { gotoAndStop (15); }
Symbol 94 Button
on (release) { gotoAndStop (13); }
Symbol 99 Button
on (release) { gotoAndStop (16); }
Symbol 100 Button
on (release) { gotoAndStop (14); }
Symbol 103 Button
on (release) { gotoAndStop (17); }
Symbol 111 Button
on (release) { gotoAndStop (15); }
Symbol 121 Button
on (release) { gotoAndStop (18); }
Symbol 122 Button
on (release) { gotoAndStop (16); }
Symbol 126 Button
on (release) { gotoAndStop (19); }
Symbol 127 Button
on (release) { gotoAndStop (17); }
Symbol 139 Button
on (release) { gotoAndStop (20); }
Symbol 140 Button
on (release) { gotoAndStop (18); }
Symbol 145 Button
on (release) { gotoAndStop (21); }
Symbol 146 Button
on (release) { gotoAndStop (19); }
Symbol 152 Button
on (release) { gotoAndStop (22); }
Symbol 153 Button
on (release) { gotoAndStop (20); }
Symbol 154 Button
on (release) { gotoAndStop (23); }
Symbol 159 Button
on (release) { gotoAndStop (21); }
Symbol 170 Button
on (press) { gotoAndPlay (2); }
Symbol 179 MovieClip Frame 1
stop();
Symbol 181 Button
on (release) { gotoAndStop (24); }
Symbol 183 Button
on (release) { gotoAndStop (22); }
Symbol 186 Button
on (release) { gotoAndStop (25); }
Symbol 190 Button
on (release) { gotoAndStop (23); }
Symbol 191 Button
on (release) { gotoAndStop (26); }
Symbol 194 Button
on (release) { gotoAndStop (24); }
Symbol 195 Button
on (release) { gotoAndStop (27); }
Symbol 199 Button
on (release) { gotoAndStop (25); }
Symbol 202 Button
on (release) { gotoAndStop (26); }

Library Items

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




http://swfchan.com/6/27055/info.shtml
Created: 22/5 -2019 00:15:06 Last modified: 22/5 -2019 00:15:06 Server time: 01/05 -2024 22:32:42