Foundation Game Design with ActionScript 3.0, Second Edition (101 page)

BOOK: Foundation Game Design with ActionScript 3.0, Second Edition
13.4Mb size Format: txt, pdf, ePub
ads

collapsing blocks of code,
46

collapsing code, in Flash Builder,
45

Collision class,
434
,
447
,
596

597
,
602

block method arguments with,
380

381

programming with,
373

378

collision detection,
331

387

with hitTestObject method,
331

336
,
357

364

advanced strategies for,
364

designing game within constraints of,
359

360

detecting collisions with bounding box,
358

359

subobjects,
360

363

triggering change of state,
337

357

picking up and dropping objects,
351

357

reducing health meter,
341

343

scaling meter with scaleX property,
343

344

updating score,
344

351

vector based,
365

387

Collision.block method,
381

387

methods, arguments, and parameters,
378

381

preventing objects from overlapping,
365

373

programming with Collision class,
373

378

Collision( ) method,
381
,
383

384

Collision.block method,
376

377
,
381

387
,
447
,
540
,
575

collisions

between character and boxes,
447

checking for

collisions between character and monster,
487

collisions with stars,
498

500

with multiple objects,
596

603

Color Library button,
67

color midpoint,
74

Color Picker window,
67

68
,
73
,
102

colors, choosing,
394

396

Colors panel,
99

comments,
34

36

compiler,
38

39
,
42
,
52

54

compiling SWF files,
36

39

clean compile,
51

52

troubleshooting,
40

45

compressed file format,
105

computer programming code editor,
2

Console window,
32

34
,
36

38
,
46

constructor method,
20
,
27

32
,
44
,
54

content debugger,
4

context sensitive,
66

control systems, player

advanced,
623

enemy AI,
624

632

firing bullets with timer,
631

632

following objects,
624

627

rotating and shooting toward mouse,
628

running away from player,
627

628

firing projectiles in all directions,
613

623

game objects,
617

618

rotating wand around fairy,
618

620

stars,
620

623

Killer Bee Pandemonium! game,
632

640

moving objects with mouse,
606

632

easing,
607

612

fixing to mouse position,
606

607

Convert Point Tool,
84

86
,
91

Create new layer button,
79
,
114

createGameObjects( ) method,
333

334
,
338
,
440

cross-platform,
7

curly braces,
22

25
,
28

30
,
41

43

curves, with pen tool,
84

87

D

Debug button,
38
,
40

Debug option,
36

37

debugging perspective,
37

decision making,
209

284

buttons,
260

270

loading images and displaying,
263

265

mouse events,
265

270

changing variable values with postfix operators,
240

gameStatus variable,
245

modular programming with methods,
252

strings,
241

245

uint vs. int variables,
245

246

winning and losing,
246

252

displaying game status,
238

240

embedding fonts,
281

282

improving programming,
253

260

disabling Enter key,
258

260

random numbers,
254

258

number guessing game,
222

224

button,
271

279

structure of program,
222

224

project extensions,
279

281

making program guess number,
281

Play again button,
279

280

tracking guesses,
280

visual display,
281

text,
210

222

basic program,
210

212

configuring and displaying,
216

222

importing classes,
212

213

setting format of,
214

216

TextFormat and TextField objects,
213

214

variables,
224

231

decrement operator, increment operator and,
184

185

Delete Anchor Point Pen tool,
84

detection, of collisions,
331

387

with hitTestObject method,
331

336
,
357

364

advanced strategies for,
364

designing game within constraints of,
359

360

detecting collisions with bounding box,
358

359

subobjects,
360

363

triggering change of state,
337

357

picking up and dropping objects,
351

357

reducing health meter,
341

343

scaling meter with scaleX property,
343

344

updating score,
344

351

vector based,
365

387

Collision.block method,
381

387

methods, arguments, and parameters,
378

381

preventing objects from overlapping,
365

373

programming with Collision class,
373

378

direction handles,
83

87

directives,
32

34

display section,
24

DisplayObject class,
305
,
310

displays, visual,
281

displayText( ) method,
163

164

DistantBackgroundImage( ) method,
325

dot notation,
159

down buttons, up buttons and,
180

182

drag handles,
69

70
,
88

drop shadow,
111

113

dropping objects, picking up objects and,
351

357

Duplicate Layer dialog box,
91

E

easing,
607

612

eatLeaves( ) method,
483

Eclipse,
4

editing window, in Flash Builder,
45

48

breakpoints,
46

48

collapsing code,
45

Elliptical Marquee Tool,
108

EmbeddedFonts( ) method,
283

embedding

fonts,
281

282

images

character and background,
310

312

overview,
304

306

emboss effect,
96

100

end of game

checking for,
349

351

overview,
453

456

endGame( ) method,
248
,
250
,
252
,
259
,
272
,
277

ending levels,
505

512

if character wins,
507

512

if monsters win,
505

507

enemy AI,
624

632

firing bullets with timer,
631

632

following objects,
624

627

rotating and shooting toward mouse,
628

running away from player,
627

628

Enter key, disabling,
258

260

ENTER_FRAME property,
290
,
296

enterFrameHandler event listener, order of code in,
487

488

enterFrameHandler handler,
296

297

environments

for Flash Builder,
10

20

configuring Flash Player in,
17

20

creating new ActionScript project,
12

17

game,
456

463

adding objects to game,
458

459

preparing artwork for,
457

458

and stage boundaries,
460

463

Essentials workspace,
59

Event class,
290
,
296

event handlers,
171

173

event listeners

enterFrameHandler,
487

488

overview,
170

171

EventListener( ) method,
169

events,
168

177

importing event class,
170

names of,
174

177

explode( ) method,
502

Explosion class,
500
,
502

503

Explosion( ) method,
479
,
501

502
,
536

537

explosion.explode( ) method,
479
,
501

502

ExplosionImage( ) method,
502

explosions

motion of in game world,
536

537

vanquishing monsters and creating,
500

503

extends keyword,
27

eye icon,
76

77
,
108
,
115
,
117

118

eyes, drawing,
421

423

F

fairies, rotating wand around,
618

620

Fill pixels option,
112

firing

bullets with timer,
631

632

projectiles, in all directions,
613

623

fixing objects, to mouse position,
606

607

Flash animation, and publishing,
640

Flash Builder,
3
,
10

20
,
45

52

editing window in,
45

48

breakpoints,
46

48

collapsing code,
45

environment for,
10

20

configuring Flash Player in,
17

20

creating new ActionScript project,
12

17

Perspectives feature,
48

52

creating clean compile of program,
51

52

creating release build of SWF file,
52

workspace,
40
,
47
,
49

Flash Debug perspective,
49

50

Flash Develop,
3

Flash file,
20

Flash perspective,
48

Flash Player

configuring in Flash Builder,
17

20

controlling properties with metadata tag,
127

129

Flash Player window,
17
,
37

flash section,
24

flash.display section,
24

FlashGames folder,
14
,
21

following objects,
624

627

fonts, embedding,
281

282

for loops,
576

578

Foreground color box,
68
,
94
,
111

ForegroundImage( ) method,
325

ForLoop( ) method,
577

formatting, text,
214

216

Freeform Pen Tool,
91

BOOK: Foundation Game Design with ActionScript 3.0, Second Edition
13.4Mb size Format: txt, pdf, ePub
ads

Other books

Break It Down by Lydia Davis
Weapons of Mass Destruction by Margaret Vandenburg
Montana Dawn by Caroline Fyffe
Bet on Ecstasy by Kennedy, Stacey
Saving Dallas by Jones, Kim
Chis y Garabís by Paloma Bordons
Tempting by Susan Mallery
Fresh Tracks by Georgia Beers
Forgive My Fins by Tera Lynn Childs
The Job Offer by Webb, Eleanor