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

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

programming,
495

503

checking collisions with,
498

500

launching,
497

498

vanquishing monsters and creating explosion,
500

503

StarImage( ) method,
496

stars, firing in all directions,
620

623

startGame( ) method,
210

211
,
222
,
224
,
239
,
247
,
271
,
274
,
473
,
476

StateChange( ) method,
338

states, triggering change of,
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

status, displaying for game,
238

240

stepping over breakpoints,
48

stops,
72

String object,
237

String property,
602

String type,
226
,
243

strings,
241

245

Stroke option,
102

Style menu,
97

subobjects,
360

363

Swatches panel,
68
,
73

Swatches tab,
68

SWF files,
142

143
,
213
,
221
,
305

306
,
628
,
632

compiling,
36

39

clean compile,
51

52

troubleshooting,
40

45

release build of,
52

swfObject.js,
39

symbols,
285

329
,
416

428

collisions between boxes and,
447

controlling with keyboard,
285

304

enterFrameHandler handler,
296

297

keyDownHandler handler,
294

keyUpHandler handler,
294

296

right way,
290

292

screen wrapping,
302

304

stage,
298

303

velocity,
292

293

wrong way,
286

290

drawing

antennae,
416

421

body,
416

shoes,
426

428

embedding images,
304

306

ending levels upon win by,
507

512

eyes,
421

423

hair,
425

426

moving 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

programming,
482

488

collisions between character and monster,
487

moving,
485

486

order of code in enterFrameHandler event listener,
487

488

properties and methods,
482

484

stage boundaries,
486

487

rosy cheeks,
428

scrolling,
307

323

code summary,
310

313

improving,
313

323

parallax,
324

329

smile,
424

425

T

text,
210

222

basic program,
210

212

configuring and displaying

input field,
218

222

output text,
216

218

importing classes,
212

213

setting format of,
214

216

TextFormat and TextField objects,
213

214

TextEdit,
4

TextField( ) method,
210
,
214
,
224
,
233
,
239
,
274
,
283
,
333
,
439
,
449

TextField object, TextFormat object and,
213

214

TextField property,
216

TextFieldAutoSize class,
217
,
452

TextFormat( ) method,
210
,
214
,
224
,
233
,
247
,
274
,
283
,
333
,
439
,
449

TextFormat object,
210
,
213

214
,
216
,
220
,
222

TextMate,
4

textured boxes,
391

407

Adobe Illustrator,
391

392

choosing colors,
394

396

drawing shape of

inside,
398

407

outside,
396

398

workspace,
393

394

TimeBombPanic application class,
439
,
452

TimeBombPanic( ) method,
440

TimeDisplay( ) method,
458

Timer class,
432
,
449

452

TIMER_COMPLETE property,
452

TimerEvent class,
450
,
452

timer.reset( ) method,
450

451

timers,
448

453

firing bullets with,
631

632

in Time Bomb Panic application class,
452

timer.start( ) method,
441
,
449

451

Tools panel,
64
,
66

67
,
69
,
82
,
86
,
89
,
101
,
107
,
114

trace directives,
36

trace method,
33

34

trace output,
10

tracing, output,
183

184

tracking, guesses,
280

transforming,
70

triggering change of

picking up and dropping objects,
351

357

scaling meter with scaleX property,
343

344

updating score,
344

351

troubleshooting, compiling SWF files,
40

45

two forward slashes (//) character,
35

type tool, in Photoshop,
114

U

uint variable, vs. int variable,
245

246

up buttons, and down buttons,
180

182

upper camel case,
54

URLRequest( ) method,
130
,
137
,
149
,
156
,
200
,
203

205

URLRequest object,
264
,
269

Use global light option,
97

UsingATimer( ) method,
449

V

vanishing, characters,
192

195

variable values, changing by one with postfix operators

gameStatus variable,
245

modular programming with methods,
252

overview,
240

strings,
241

245

uint vs. int variables,
245

246

winning and losing,
246

252

variables,
134

135
,
224

231

listening for key presses,
227

231

types of,
135

vector based collision detection,
365

387

Collision.block method,
381

387

methods, arguments, and parameters,
378

381

Collision class,
380

381

values,
380

preventing objects from overlapping,
365

373

programming with Collision class,
373

378

vectors,
64
,
111

velocity,
292

293

View/Controller class,
541

virtual machine,
53

visual displays,
281

volume setting, and pan setting,
572

574

W

wanderAimlessly( ) method,
483

wands, rotating around fairy,
618

620

white arrow,
82

84
,
86
,
91

winning, and losing,
246

252

workspaces,
59
,
393

394

X

x positions, and y positions,
150

155

x property, and y property,
198

XCode,
4

Y, Z

y positions, x positions and,
150

155

y property, x property and,
198

YouLostImage( ) method,
506

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

Other books

Smoke in the Room by Emily Maguire
Murder in Passy by Cara Black
The Laird's Daughter by Temple Hogan
Going Home by Harriet Evans
The Naked Viscount by Sally MacKenzie
The Replacement by Wade, Rachael