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

C

calculating distance formula, 432 “437

calculus Web sites, 721

call function, 277 “279

calling functions, 335

Capabilities object, 298

Cartesian coordinate system, 98

case clauses

default keyword, 64

switch statements, 61 “64

case sensitivity

ActionScript, 28

classes, 509, 511

HTML, 711

strings, 266, 269, 276

variables , 52

CGI (Common Gateway Interface), 679

chat rooms, 690

programming servers, 679, 690

tracking, 690

characters (ASCII), keyboard shortcuts, 696 “701

charAt function, 266 “267

charCodeAt function, 267

chat rooms, 690

checkers, 534, 544

chess, 534, 544

circle to circle collision response, 610 “612

circle to point collision response, 602 “609

classes

objects, 253

OOP

accessing, 510 “511

case sensitivity, 509, 511

compile-time, 519 “530

constructors, 507 “508, 516

data hiding, 523

data types, 521 “523

declaring variables, 516

defining, 507 “510, 513 “518

directories, 510 “511, 529 “530

dynamic, 519 “521

extending, 513 “519, 526 “527

file name extensions, 508

folders, 510 “511, 529 “530

function stubs, 517 “518

functionality, 506 “507

functions, 507 “508, 514

inheritance, 513 “519, 526 “527

instantiating, 512

interfaces, 525 “526

libraries, 510 “511

naming, 508 “510, 517

overview, 506

packages, 529 “530

parent/child relationships, 514

programming by contract, 525

properties, 507 “508, 514, 528 “529

run-time, 527 “530

saving, 508 “510

static functions, 527 “528

static properties, 527 “528

storing, 510 “511

superclasses, 514 “518

symbols, 512 “513

syntax, 507 “508

troubleshooting, 519

clauses, case

default keyword, 64

switch statements, 61 “64

clear function, 324 “325

clearInterval function, 374 “375

client/server objects, 332 “333

clips. See also files; movies

bounding boxes, 315

buttons

hit areas, 156 “157

labels, 151

states, 150 “153

creating, 8 “9

depths, 319 “320

event handlers

buttons, 149 “157

loading data, 146

mouse, 146 “149

onData, 146

onDragOut, 154

onDragOver, 155

onEnterFrame, 144 “145

onLoad, 145

onMouseDown, 146 “147

onMouseMove, 148 “149

onMouseUp, 147 “148

onPress, 153

onRelease, 154

onReleaseOutside, 154

onRollOut, 155 “156

onRollOver, 155

onUnload, 145 “146

registering, 290

scope, 143 “144

flipping, 100

hiding, 100

instances

copying, 136 “137

deleting, 136

depths, 134 “136, 138

duplicating, 136 “137

dynamic, 130 “134

empty, 138 “140

event handlers, 137, 141 “143

naming, 140

parent/child relationships, 139

properties, 139

removing, 136

scripts, 141

stacking, 113

iterating, 466

listeners, 285, 290

loading, servers, 659 “663

MovieClip object, 306 “327

Drawing API, 321 “327

functions, 311 “327

properties, 306 “311

MovieClipLoader object, 327

moving, 313 “315

objects

moving, 97 “99

parent/child relationships, 104 “106

position, 97 “99

referencing

arrays, 208 “209

self referencing, 103 “104

rotating, 101

scope, 94 “95

scripts

authoring, 398

frames , 32 “33

size , 100

stage, 10

troubleshooting, 10, 133

variables, declaring, 96

viewing, 100

clock ( Shoot 'Em Up ), 406

closing panels, 5

code blocks

{} operator, 55, 65

case clauses, 61 “64

comments, 49

default keyword, 64

indenting, 60

overview, 65

scope, 92 “94

collapsing panels, 5

collision

detection

Blow 'Em Up , 477 “478, 487 “488

Critter Attack , 346 “350

Mouse Chaser , 118 “123

trigonometry, 435 “437

response, 602 “612

angular velocity, 614 “615

circle to circle collision, 610 “612

circle to point collision, 602 “609

optimizing, 612

Pachinko , 647 “649

short-circuiting , 612

skipping, 613 “614

spin, 614 “615

velocity, 613 “614

color

Actions panel, 48

base systems, 301

Color object, 299 “306

functions, 299 “306

properties, 303

hexadecimal, 300 “303

images, 10 “11

transforms, 303 “306

Color object, 299 “306

functions, 299 “306

properties, 303

commands

Control menu, 23

Edit menu, 6

File menu

Import, 11

Import to Stage, 11

New, 6

Publish Preview, 24

Publish Settings, 24

Insert menu

Create Motion Tween, 22

New Symbol, 8, 11

Window menu

Developmental Panels, 28

Save Panel Layout, 5

comments, 48 “49

Common Gateway Interface. See CGI

communicating

browsers, 674 “676

servers, 658 “659

comparison operators, 52 “54

compile-time, classes, 519 “530

components (vectors), 583 “584, 588

component-wise multiplication, 588

compound assignment operators, 46 “47

concat function, 190 “192, 268

conditional statements

break, 61 “62

else, 56 “57

else if, 57 “59

if, 55 “56, 59 “60

Match 'Em Up , 217 “222

nesting, 59 “60, 176, 409

Sliders , 242

switch, 60 “65

case clauses, 61 “64

default keyword, 64

expressions, 61

timelines , 385

Connect 4, 534

constants

Infinity (Number object), 264

Key object, 282 “283

constructors

classes, 507 “508, 516

objects, 254

Control menu commands, 23

converting variables

booleans, 70 “73

numbers , 70 “72

strings, 71 “73

troubleshooting, 73

types, 70

coordinates

coordinate system, 98

distance formula, 432 “437

copying clips, 136 “137

core objects, 256 “280

cosine function, 444 “449

counters, frames, 388 “390

Create Motion Tween command (Insert menu), 22

Create New Symbol dialog box, 8

createTextField function, 313

creating

arrays, 185, 204

buttons (button menu), 167 “168

clips, 8 “9

files, 6

functions, 88 “89

movies, 6 “9

symbols, 8 “9

variables, 38 “39

classes, 516

clips, 96

Critter Attack

alignment, 334

background, 353 “354

collision detection, 346 “350

idea, 333 “334

implementing, 334 “357

instructions, 358

listing, 359 “367

moving, 338 “352

object depths, 335

objects, 337 “352

resetting, 352 “353

scoreboard, 336

size, 334

sound, 354 “357

speed, 336

testing, 358

timeline, 334

crosshairs ( Shoot 'Em Up ), 390, 405 “406

currentframe function, 162 “163

curveTo function, 323 “324

custom objects, 253

Категории