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

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

Layer Styles window,
97

layers, in Photoshop,
76

79
,
91

96
,
109

110

Layers palette,
95

Layers panel,
76

78
,
91

92
,
103
,
109
,
112

114

LevelCompleteImage( ) method,
506

LevelOne class,
467

468
,
471
,
473
,
475
,
485

486
,
491

492
,
506

_levelOne object, giving access to stage,
471

474

levels

checking for end of,
503

505

ending,
505

512

if character wins,
507

512

if monsters win,
505

507

finishing first,
518

firing star weapons in second,
519

522

LevelTwo.as file,
519

linking layers, in Photoshop,
109

110

listening, for key presses,
227

231

Loader class,
139
,
305

Loader( ) method,
130
,
149
,
200
,
204

205
,
269
,
274
,
287
,
291
,
304

Loader object,
132

134
,
143
,
198
,
304

Location option,
73

74

looping

arrays,
583

584

sound effects,
570

572

LoopingMusic( ) method,
573

LoopingThroughBoxes( ) method,
598

losing, and winning,
246

252

lower camel case,
54

M

makeButton( ) method,
269

271
,
274

275

MakingBoxes( ) method,
592

math, and programming,
7

8

Math class,
254
,
376

Math.abs method,
539

Math.ceil.Math.random( ) method,
256

257
,
480
,
493
,
538

539

Math.floor.Math.random( ) method,
255
,
257
,
272
,
276

Math.random( ) method,
254
,
376

Math.round.Math.random( ) method,
254

255
,
257

metadata tag, controlling Flash Player properties with,
127

129

MeterInsideImage( ) method,
342

MeterOutsideImage( ) method,
342

meters

health, reducing,
341

343

scaling with scaleX property,
343

344

method calls,
160

methodName( ) method,
161

methods,
159

168

arguments, parameters and,
378

381

Collision class,
380

381

multiple,
167

168

overview,
165

167

values,
380

modular programming with,
252

properties and,
482

484

returning values,
380

MethodWithoutParameters( ) method,
163

MethodWithParameters( ) method,
166

Model View Controller (MVC),
278

modular programming, with methods,
252

Monster class,
489
,
491

492

Monster Mayhem game,
522

540

intelligent monsters,
537

540

moving objects in scrolling game world,
522

537

coding example,
523

explosions,
536

537

operation of,
534

536

obstacles and pathfinding,
540

Monster( ) method,
476
,
489

490

MonsterMayhem class,
469
,
510

MonsterMayhem( ) method,
468
,
510

MonsterMouthClosedImage( ) method,
490

MonsterMouthOpenImage( ) method,
490

MonsterNormalImage( ) method,
333
,
337
,
340

monster.openMouth( ) method,
478
,
499

monsters

checking for collisions between character and,
487

ending levels upon win by,
505

507

intelligent,
537

540

programming,
489

495

vanquishing and creating explosion,
500

503

MonsterScaredImage( ) method,
338
,
340

motion

of characters,
485

486

of objects, controlling with mouse,
606

632

of objects in scrolling game world,
522

537

coding example,
523

explosions,
536

537

operation of,
534

536

physics,
545

564

acceleration,
548

555

bouncing,
557

559

friction,
555

557

game object class for,
546

548

gravity,
559

561

jumping,
561

564

mouse

moving objects with,
606

632

easing,
607

612

fixing to mouse position,
606

607

rotating and shooting toward,
628

Mouse class,
606

607

mouse events,
265

270

MouseEvent class,
170

171
,
174
,
286

MouseEvent type,
172

Move Tool,
69

70
,
75
,
92

94
,
103

104
,
114

movement

blocking at edges of stage,
298

303

incremental, of characters,
182

198

limiting,
185

188

multilevel games,
465

543

firing star weapons in level two,
519

522

Monster Mayhem game,
522

540

intelligent monsters,
537

540

moving objects in scrolling game world,
522

537

obstacles and pathfinding,
540

programming,
471

518

character,
482

488

events,
514

518

giving _levelOne object access to stage,
471

474

LevelOne class,
475

levels,
503
,
512

518

monsters,
489

495

removing objects with removeChild method,
513

514

star weapon,
495

503

structure of,
466

470
,
541

542

multiline comment,
35

Music( ) method,
573

MVC (Model View Controller),
278

MySQL database,
641

N

naming conventions,
54

New file dialog window,
60

New Style button,
99

Notepad,
4

number guessing game,
222

224

button,
271

279

disabling at end of game,
272

273

managing complex code,
278

279

structure of program,
222

224

Number type,
226

NumberGuessingGame( ) method,
210
,
222
,
271
,
274

NumberGuessingGame.as file,
271

numbers

making program guess,
281

random,
254

258

O

Object class,
226

objects

adding to game,
444

446
,
458

459

instances and,
137

140

managing multiple,
432

433

obstacles, and pathfinding,
540

Opacity option,
73

Open Perspective button,
50

openMouth( ) method,
490

492

Options bar,
66

67
,
69
,
90
,
92
,
101
,
104
,
107
,
111
,
114

Outline window,
31

32
,
48

output text,
216

218

output, tracing,
183

184

outside shapes, of textured box,
396

398

overlapping, preventing,
365

373

P, Q

Package Explorer,
21

22
,
48

package keyword,
42

packages,
22

32

alignment of code in,
29

32

classes in,
25

27

constructor methods in,
27

29

sprites in,
23

25

padlock buttons,
79
,
99

Paint Bucket Tool,
94
,
103

pan setting, volume setting and,
572

574

parallax scrolling,
324

329

ParallaxScrolling( ) method,
326

parameters, methods and arguments,
378

381

Collision class,
380

381

values,
380

Path Selection Tool,
83

pathfinding, obstacles and,
540

paths, for pen tool,
79

84

filling with color,
88

91

resizing,
87

88

Paths panel,
88

90

PDF file,
119

pen tool,
79

91

anchor points and paths,
79

84

filling path with color,
88

91

making curves,
84

87

resizing paths,
87

88

Perspectives feature, in Flash Builder,
48

52

creating clean compile of program,
51

52

creating release build of SWF file,
52

Photoshop,
2

bevel and emboss effects,
96

100

creating new file,
60

64
,
106

107

drawing buttons,
110

118

drawing circles,
108

gradients,
71

76

layers,
76

79
,
91

96
,
109

110

pen tool,
79

91

anchor points and paths,
79

84

filling path with color,
88

91

making curves,
84

87

resizing paths,
87

88

rectangular selection tool,
100

106

resources for,
119

type tool,
114

Photoshop Elements,
3

Photoshop file,
110
,
115

picking up objects, and dropping objects,
351

357

pixels,
62

64

platform games,
545

604

motion using physics,
545

564

acceleration,
548

555

bouncing,
557

559

friction,
555

557

game object class for,
546

548

gravity,
559

561

jumping,
561

564

with multiple objects,
575

604

arrays,
580

589

boxes,
589

596

case studies,
603

604

collisions with,
596

603

for loops,
576

578

sound effects in,
567

574

integrating,
569

570

looping,
570

572

volume and pan setting,
572

574

Play again button,
279

280

player control systems

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

Other books

Descendants Junior Novel by Disney Book Group
Threads by Sophia Bennett
G-Man and Handcuffs by Abby Wood
Reagan's Revolution by Craig Shirley
ICEHOTEL by Allen, Hanna
Masks by Fumiko Enchi
Redemption by Stacey Lannert
Since She Went Away by David Bell