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

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

A Button Tutorial.swf

This is the info page for
Flash #60146

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


Text
What's a button?

Coding?

EdItInG a BuTtOn?

1

2

3

x

Button Tutorial

A button is like a
movie clip but it can
transport the flash to a
different frame by
clicking on it

A button can be a rectangle

or if you want it to be complicated,
a full figure

So you've got your
figures

You can turn any figure into a
button easily.

Just select the figure and press F8.
OR
Right click the figure and select
convert to symbol

F8

Name your figure, "button", (or whatever you wanna call it)
and selet the button option

Now how do you make your
work?

If you want a button to
work you must use

What's this "action script" you speak of?

coding

ction

cript

A   S

Are you smarter than an Actionscript noob?

How do I insert action script?

What is action script?

Why/When whould I use it?

I don't care about action script!

Why/When would I use it?

Action Script (a.k.a AS) is...

a type of programming.
It Can...

make a             work, program a
game, and lots of other things
We're gonna work on buttons

To insert Action Script into a
button, press F9,
OR
right click and select actions
OR
look at the bottom of the screen.
You should see the work actions
next to an arrow. Click the blue
bar after selecting your figure

too many words eh

need help?

Handlers ::: tell the  button when to do the action

on(release) ::: when the user 'unclicks' the
button

on(press) ::: as soon as the button's clicked

on(rollover) ::: as soon as the button is rolled
over by the cursor

* varations explained here *

( the common ones )

nextFrame()/prevFrame()

This either moves the person to the       next or prev frame

gotoAndPlay()/gotoAndStop()    This sends the person to a frame (put the frame
number in between the parentheses)  Play/Stop are Self-Explanatory

ALL SCRIPTS ARE NON-COPYABLE AND CaSe SeNsItIve

I aLwAyS wAnTeD tO dO tHaT

nextScene()/prevScene()   This obviously moves the person to a scene

getUrl()   explained

here

Mess around with AS to get others

play()/stop()  do you need an explanation?

So now your button works... you want it too look cool?

Wanna learn how to do that? (twss)

Editing a Button:
How to make a button change

The Button's Appearance

How does that button change when you click
it or roll over it?
( no actionscript required )

"up" - what the button looks like normally  ( when not
clicked or rolled over )

"down" -  what the button looks like after it's been clicked

"hit" - what the button looks like when it's clicked and held
down

"over" -  what the button looks like when the cursor rolls
over it

In the edit menu there should be these options:

When you roll over this
figure, it changes. That is
"over"

You can click this figures
grey outline. That is it's
"hit" area.

How this figure looks
when you don't do
anything is "up"

Good luck with your buttons.
Hopefully you found
everything you needed. If
you didn't leave a review and
tell me what you need to find.

ActionScript [AS1/AS2]

Frame 2
stop(); var junk = new Sound(); var techno = new Sound(); var awesome = new Sound();
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Frame 8
stop();
Frame 40
stop();
Frame 41
stop();
Frame 42
stop();
Frame 43
stop();
Frame 44
stop();
Frame 45
stop();
Frame 47
stop();
Frame 48
stop();
Frame 49
stop();
Frame 50
stop();
Frame 51
stop();
Frame 52
stop(); junk.stop(); britmusic.stop(); awesome.stop(); var applause = new Sound(); var yeehaw = new Sound(); var cheer = new Sound(); applause.attachSound("applause"); yeehaw.attachSound("yeehaw"); cheer.attachSound("cheer"); applause.start(0, 1); yeehaw.start(0, 1); cheer.start(0, 1); cheer.setVolume(50); applause.setVolume(50); yeehaw.setVolume(100);
Symbol 45 Button
on (release) { getURL ("http://www.newgrounds.com", "_blank"); }
Symbol 54 Button
on (release) { startMovie(); }
Symbol 56 MovieClip Frame 1
function timerHandler() { if (!loadingComplete) { var _local4 = _root.getBytesLoaded() / _root.getBytesTotal(); bar._xscale = 100 * _local4; if (_local4 == 1) { loadingComplete = true; if (AUTO_PLAY) { startMovie(); } else { gotoAndStop ("loaded"); } return(undefined); } } dt = getTimer() - time; time = time + dt; frameAccum = frameAccum + dt; var _local3 = 0; while ((frameAccum >= FRAME_TIME) && (_local3 < MAX_FRAME_SKIP)) { advanceFrame(tankLogo, true, true); advanceFrame(loadingText, false, true); advanceFrame(barGfx, false, true); if (loadingComplete) { advanceFrame(this, false, false); } (frameAccum = frameAccum - FRAME_TIME); _local3++; } updateAfterEvent(); } function advanceFrame(clip, recurse, loop) { if (!clip) { return(undefined); } clip.stop(); if (clip._currentframe == clip._totalframes) { if (loop) { clip.gotoAndStop(1); } } else { clip.nextFrame(); } if (recurse) { for (childName in clip) { if (typeof(clip[childName]) == "movieclip") { advanceFrame(clip[childName], recurse, loop); } } } } function startMovie() { clearInterval(intervalId); _root.play(); } _root.stop(); stop(); var FRAME_TIME = 33.3333333333333; var AUTO_PLAY = false; var MAX_FRAME_SKIP = 5; var loadingComplete; var intervalId; var time; var frameAccum; loadingComplete = false; intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2); frameAccum = 0; time = getTimer(); timerHandler();
Symbol 56 MovieClip Frame 2
stop();
Symbol 61 Button
on (release) { nextFrame(); }
Symbol 64 Button
on (release) { gotoAndPlay (9); }
Symbol 66 Button
on (release) { gotoAndPlay (47); }
Symbol 68 Button
on (release) { junk.start(0.1, 999999999); junk.attachSound("junk"); } on (release) { awesome.stop(); } on (release) { britmusic.stop(); }
Symbol 70 Button
on (release) { awesome.start(0.1, 999999999); awesome.attachSound("brit music"); } on (press) { junk.stop(); } on (press) { britmusic.stop(); }
Symbol 72 Button
on (release) { techno.start(0.1, 999999999); techno.attachSound("techno"); } on (press) { junk.stop(); } on (press) { awesome.stop(); }
Symbol 74 Button
on (release) { junk.stop(); } on (release) { britmusic.stop(); } on (release) { awesome.stop(); }
Symbol 82 Button
on (release) { prevFrame(); }
Symbol 83 Button
on (release) { nextFrame(); }
Symbol 84 Button
on (release) { junk.start(0.1, 999999999); junk.attachSound("Song1"); } on (release) { awesome.stop(); } on (release) { britmusic.stop(); }
Symbol 107 Button
on (release) { gotoAndPlay (9); }
Symbol 112 Button
on (release) { gotoAndPlay (9); }
Symbol 122 Button
on (release) { gotoAndPlay (47); }
Symbol 124 Button
on (release) { nextFrame(); }
Symbol 125 Button
on (release) { nextFrame(); }
Symbol 126 Button
on (release) { gotoAndPlay (42); }
Symbol 127 Button
on (release) { gotoAndStop (8); }
Symbol 134 Button
on (release) { gotoAndStop (46); }
Symbol 140 Button
on (release) { gotoAndStop (46); }
Symbol 150 Button
on (release) { gotoAndPlay (46); }
Symbol 156 Button
on (release) { gotoAndPlay (47); }
Symbol 180 Button
on (release) { gotoAndStop (1); }

Library Items

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

Instance Names

"bar"Symbol 56 MovieClip Frame 1Symbol 9 MovieClip
"tankLogo"Symbol 56 MovieClip Frame 1Symbol 44 MovieClip
"loadingText"Symbol 56 MovieClip Frame 1Symbol 48 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 1 as "yeehaw"
ExportAssets (56)Timeline Frame 1Symbol 2 as "Song1"
ExportAssets (56)Timeline Frame 1Symbol 3 as "cheer"
ExportAssets (56)Timeline Frame 1Symbol 4 as "brit music"
ExportAssets (56)Timeline Frame 1Symbol 5 as "applause"
ExportAssets (56)Timeline Frame 1Symbol 6 as "techno"

Labels

"loaded"Symbol 56 MovieClip Frame 2




http://swfchan.com/13/60146/info.shtml
Created: 16/4 -2019 10:18:58 Last modified: 16/4 -2019 10:18:58 Server time: 19/05 -2024 06:28:06