Macromedia Flash MX 2004 Game Programming (Premier Press Game Development)

F

factorial (!) operator, 535

factorials, recursion functions, 535 “537, 540

fields, text

dynamic, 12

input, 12

Selection object, 290

static, 12 “13

TextField object, 327

File menu commands

Import, 11

Import to Stage, 11

New, 6

Publish Preview, 24

Publish Settings, 24

files. See also clips; movies

Blow 'Em Up , 452 “456

button menu, 165 “166

creating, 6

file names (classes), 508

importing, 231

loading, servers, 659 “663, 668 “672

marbles , 597

Match 'Em Up , 210

Mouse Chaser , 110 “115

Pachinko , 617 “625

Shoot 'Em Up , 381 “391

Sliders , 230 “233

Tic Tac Toe , 545 “546

fill color , 10 “11

Find, troubleshooting, 52

Finite State Machines (FSMs), 375

firing ( Blow 'Em Up ), 473 “476

Flash

keyboard, 704 “708

Web sites, 720

Flash Communications Server, 678

flexibility, designing games , 380

flipping clips, 100

folders

classes, 510 “511, 529 “530

layers , timelines , 20

library, 10

for in loops , iterating clips, 466

for loops, 68 “69

incrementing, 94

nesting, 94

force, 592

force fields ( Blow 'Em Up ), 452, 454 “455, 458, 461, 473, 488 “491

foreground ( Shoot 'Em Up ), 385 “386

formatting text, 327

formula, distance, 432 “437

forum Web sites, 721 “722

frames

counters, 388 “390

labels, 20 “22

layers, 20 “21

movies, 161 “164

refreshing, timing, 428 “430

scripts, 30 “33

sound, 328

timelines, 17 “18, 161 “164

freezing ( Blow 'Em Up ), 454 “455, 461, 488 “491

friction, 595 “596

fromCharCode function, 267 “268

FSMs (Finite State Machines), 375

Function object, 277 “279

functionality

button menu, 170 “171, 178 “179

classes, 506 “507

Match 'Em Up , 210 “211

functions

addListener, 285 “286, 290

apply, 279

arrays, 187 “188

concat, 190 “192

join, 190

pop, 193 “194

push, 194 “195

reverse, 192 “193

shift, 195 “196

slice, 200 “202

sort , 197 “200

sortOn, 200

splice, 202 “204

toString, 188 “189

unShift, 196 “197

attachMovie, 132 “134

attachSound, 329

beginFill, 325 “326

beginGradientFill, 326 “327

blocking, 672

boolean, 279

Boolean object, 262 “263

built-in

arguments, 84 “86

objects, 82 “84

overview, 82 “84

return values, 86

call, 277 “279

calling, 335

charAt, 266 “267

charCodeAt, 267

classes, 507 “508, 514

clear, 324 “325

clearInterval, 374 “375

Color object, 299 “306

concat, 190 “192, 268

createTextField, 313

currentframe, 162 “163

curveTo, 323 “324

declaring, 88

defining, 88 “89, 335

destructive, 192

endFill, 326

eval, 140

executing, 84

fromCharCode, 267 “268

Function object, 277 “279

get, 528 “529

getAscii, 286 “287

getBounds, 315 “317

getBytesLoaded, 332

getBytesTotal, 332

getCode, 287

getDepth, 320

getInstanceAtDepth, 320

getNextHighestDepth, 320

getPan, 331

getRGB, 299 “303

getTimer, 224 “226, 373

getTransform, 303 “304, 331

getURL, 320, 674 “676

getVolume, 330 “331

global, 84

globalToLocal, 318 “319

gotoAndPlay, 160

gotoAndStop, 161

hide, 288 “289

hitTest, 122 “123

indexOf, 269

isDown, 284

isNaN, 46

isToggled, 287

join, 190

Key object, 283 “287

lastIndexOf, 269 “270

lineStyle, 322

lineTo, 322 “323

loadSound, 332

loadVariables, 668 “673, 682 “686

localToGlobal, 317 “318

math, 446. See also trigonometry

Math object, 258 “260

members , viewing, 85

methods , 84

Mouse object, 288 “290

moveTo, 321 “322

MovieClip object, 311 “327

nextFrame, 161 “162

nondestructive, 192

number, 279

objects

comparison, 262, 279

troubleshooting, 262, 279

OOP

data types, 522 “523

private, 523 “525

public, 523 “525

overview, 82, 86 “87

play, 160

pop, 193 “194

prevFrame, 162

push, 194 “195

recursion, 535

base cases, 539 “540

factorials, 535 “537, 540

performance, 540 “541

powers, 537 “540

tail recursion, 540

Tic Tac Toe , 562 “573

reference variables , 106

removeListener, 285 “286, 290

reverse, 192 “193

set, 528 “529

setInterval, 224 “226, 373 “374

setPan, 331

setRGB, 299 “303

setTransform, 304 “306, 331

setVolume, 330 “331

shift, 195 “196

show, 289 “290

slice, 200 “202, 270 “272, 274

Sound object, 329 “332

sort, 197 “200

sortOn, 200

splice, 202 “204

split, 274 “275

start, 329 “330

startDrag, 313 “315

static, 527 “528

stop, 158 “159, 330

stopDrag, 313 “315

string, 279

String object, 265 “276

stubs, 393, 517 “518

substr, 272 “274

substring, 273 “274

swapDepths, 320

syntax, 86 “87

toLowerCase, 276

toString, 188 “189, 262, 276

totalFrames, 163 “164

toUpperCase, 276

trace, 36 “37, 189

trigonometry, 442 “443

arccosine , 445 “449

arcsine, 445 “449

arctangent, 445 “449

cosine, 444, 446 “449

inverse, 445 “449

sine, 443 “444, 446 “449

tangent, 444 “449

unShift, 196 “197

updateAfterEvent, 289

user -defined

arguments, 89 “91

creating, 88 “89

overview, 88 “89

return values, 91 “92

variables, 90 “91

valueOf, 262 “263

Категории