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

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

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

playerProdcutinstall.swf,
39

playGame( ) method,
233

234
,
236
,
239
,
249
,
251
,
272
,
276

278

playing fields, designing,
429

430

PlayingSounds class,
567

PlayingSounds( ) method,
568

PNG (Portable Network Graphics),
58
,
262
,
304
,
390
,
392

393
,
416
,
431
,
437
,
482

positioning

backgrounds,
312

313

Sprite objects on stage,
148

158

displaying and positioning buttons,
155

158

x and y positions of objects,
150

155

postfix operators

changing variable values by one with,
240

gameStatus variable,
245

modular programming with methods,
252

strings,
241

245

uint vs. int variables,
245

246

winning and losing,
246

252

private methods,
469

470

private variables,
469

470

Problems window,
36

37
,
40

41
,
43

programming,
8

9
,
121
,
207
,
389

463

buttons,
158

178

dot notation,
159

events,
168

177

function definitions,
161

method calls,
160

methods,
159

160
,
163

168

character,
482

488

collisions between monster and,
487

moving,
485

486

order of code in enterFrameHandler event listener,
487

488

properties and methods,
482

484

stage boundaries,
486

487

code summary,
202

collisions between character and boxes,
447

definition of classes,
434

439

defusing bombs,
447

448

ending game,
453

456

events

bubbling,
516

518

communicating between classes by dispatching,
514

515

graphics,
390

431

bomb,
407

416

characters,
416

428

designing playing field,
429

430

Game Over,
430

431

textured box,
391

407

improving,
253

260

disabling Enter key,
258

260

random numbers,
254

258

languages,
52

53

LevelOne class,
475

levels

checking for end of,
503

505

ending,
505

512

finishing first,
518

loading and displaying images,
123

158

background.png,
130

131

code structure,
147

controlling Flash Player properties,
127

129

empty boxes,
136

137

explanation of process,
132

134

instances and objects,
137

140

setting up new projects,
124

126

setup file,
126

127

stage,
140

146
,
148

158

variables,
134

135

and math,
7

8

modular, with methods,
252

monsters,
489

495

moving character incrementally,
182

198

alpha property,
198

changing character size,
189

192

increment and decrement operators,
184

185

limiting movement,
185

188

spinning,
195

197

tracing output,
183

184

vanishing,
192

195

x and y properties,
198

multilevel games,
471

518

character,
482

488

giving _levelOne object access to stage,
471

474

LevelOne class,
475

naming conventions,
54

objects

adding to game,
444

446

managing multiple,
432

433

overcoming fear of,
122

overview,
6

7

scrolling game environment,
456

463

adding objects to game,
458

459

preparing artwork for,
457

458

and stage boundaries,
460

463

software required,
3

4

Sprite objects

centering,
198

202

controlling with properties,
178

182

stage boundaries,
446

447

star weapon,
495

503

checking collisions with,
498

500

launching,
497

498

vanquishing monsters and creating explosion,
500

503

TimeBombPanic application class,
439

timers,
448

453

Project Properties window,
18

projectiles, firing in all directions

game objects,
617

618

rotating wand around fairy,
618

620

stars,
620

623

properties, and methods,
482

484

PSD file,
105
,
110
,
115
,
120

public class,
25

28
,
32
,
35

publishing, Flash animation and,
640

R

random( ) method,
255

random numbers,
254

258

randomizing, firing of bullets with timer,
632

Rectangle Tool,
65

66
,
108

Rectangular Marquee Tool,
101
,
108

rectangular selection tool,
100

106

Reflect command,
420

removing breakpoints,
47

requirements,
2

5

Adobe Flash Professional,
5

computer,
2

experience,
5

6

graphic design software,
2

3

programming software,
3

4

reserved words,
23

resizing paths, pen tool,
87

88

resources, for Photoshop,
119

rotating

and shooting toward mouse,
628

wand around fairy,
618

620

Run command,
36

Run menu,
47

48

S

Save for Web and Devices window,
106

scaleX property, scaling meters with,
343

344

scaling,
69

scores, updating,
344

351

screen wrapping,
302

304

scrolling,
307

323

code summary,
310

313

game environments,
456

463

adding objects to game,
458

459

preparing artwork for,
457

458

and stage boundaries,
460

463

game world, motion of objects in,
522

537

improving,
313

323

parallax,
324

329

ScrollingLevel class,
523

ScrollingMonsters( ) method,
523

SDK (software development kit),
4

searching, arrays,
584

586

Select stop color window,
73

74

semicolon (;) character,
24
,
33

setup file,
126

127

setupEventListeners( ) method,
333

334
,
338
,
440

441

setupTextfields( ) method,
210
,
222

223
,
271
,
274
,
333
,
440

441

Shape class,
361
,
364

Shape( ) method,
361

Shape object,
361

Shape tools,
64
,
111

112

shoes, drawing,
426

428

Show Bounding Box option,
87

Show Transform Controls,
69
,
92

SimpleButton class,
270

SimpleButton( ) method,
140

SimpleKeyboardControl( ) method,
287

simpleMethod( ) method,
160

sky, for game worlds,
64

76

Sky layer,
79

smiles, drawing,
424

425

software development kit (SDK),
4

Sound class,
569

sound effects, in platform games,
567

574

integrating sound effects,
569

570

looping sound effects,
570

572

volume and pan setting,
572

574

Sound object,
568

SoundChannel( ) method,
568

570
,
573
,
598

SoundChannel object,
569
,
571
,
573

574

SoundTransform class,
572

574

source files,
22
,
45

spinning, characters,
195

197

Sprite class,
20
,
139
,
159
,
178
,
436
,
446
,
537

Sprite( ) method,
130
,
140
,
203
,
205
,
274
,
291
,
325
,
337
,
340
,
433

Sprite objects

centering,
198

202

controlling with properties,
178

182

and loader objects,
132

134

positioning on stage,
148

158

displaying and positioning buttons,
155

158

x and y positions of objects,
150

155

sprites,
23

25

square.graphics.endFill( ) method,
361

362

stage,
140

146

blocking movement at edges of,
298

303

boundaries of

overview,
446

447

scrolling game environments and,
460

463

checking for boundaries of,
486

487

giving _levelOne object access to,
471

474

positioning Sprite objects on,
148

158

displaying and positioning buttons,
155

158

x and y positions of,
150

155

setting boundaries of,
298

Stage class,
221

stage.addChild( ) method,
145
,
436
,
472

StageBoundaries file,
302

Star class,
496

497
,
521

Star( ) method,
476
,
496

star weapons

firing in level two,
519

522

Other books

A Grave Man by David Roberts
Should've Been a Cowboy by Vicki Lewis Thompson
Evacuation by Phillip Tomasso
A Specter of Justice by Mark de Castrique
Little Known Facts: A Novel by Christine Sneed
Love Lift Me by St. Claire, Synthia
Insignia by Kelly Matsuura
The Fall of Dorkhun by D. A. Adams
0692672400 (S) by Sam Sisavath