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

S

Save Panel Layout command (Window menu), 5

saving classes, 508 “510

scalar multiplication (vectors), 585 “586

scaleMode property, 291 “295. See also size

scaling. See size

scenes, movies, 22

scope

clips, 94 “95, 143 “144

code blocks, 92 “94

event handlers, 143 “144

local, 92 “94

movies, 94 “95

overview, 92

scoreboards

Blow 'Em Up , 455 “456

Critter Attack , 336

designing, 681 “690

implementing, 681 “690

Mouse Chaser , 114 “115, 120 “121

Perl scripts, 685 “690

profanity, 690

security, 689 “690

Shoot 'Em Up , 388, 406

Sliders , 232 “233, 237

screens

implementing, 525 “526

overview, 4 “5

scripts, 29

Actions panel, 28 “30

authoring, 398

case sensitivity, 28

attaching, 29 “31

clips, 141, 398

code blocks, 49, 60

comments, 49

event handlers, 33 “35

frames , 30 “33

games , designing, 398

images, 11

instances, 33 “35

libraries, 390

Match 'Em Up , 210 “211

Mouse Chaser , 115 “116

overview, 28

Perl

naming, 682 “683

scoreboards, 685 “690

semicolons, 47, 55, 67, 69

server-side. See servers

Shoot 'Em Up , 385, 399 “405

state machines, 377 “378, 399 “405

symbols, 390

timelines , 385, 390

troubleshooting

images, 11

syntax errors, 47

Web sites, 722

searches, minimax, 544

Tic Tac Toe , 562 “573

Web sites, 721

security

loading, servers, 661, 673 “674

scoreboards, 689 “690

selecting

loops , 69

text fields, 290

Selection object, 290

self-referencing, clips, 103 “104

semicolon (line-ending character), 47, 55, 67, 69

servers

communicating, 658 “659

Flash Communications Server, 678

loading

clips, 659 “663

events, 672 “673

files, 659 “663, 668 “672

HTML, 663

images, 662 “663

movies, 659 “663

preloaders , 663 “668

security, 661, 673 “674

text, 668 “672

XML, 670

overview, 658

programming, 678

ASP, 679

CGI, 679 “690

chat rooms, 690

embedded languages, 679 “680

JSP, 679

Perl, 680 “681

PHP, 679

Python, 680

tracking, 690

set function, 528 “529

setInterval function, 224 “226, 373 “374

setPan function, 331

setRGB function, 299 “303

sets, panels, 5

setTransform function, 304 “306, 331

setVolume function, 330 “331

shields ( Blow 'Em Up ), 452, 454 “455, 458, 461, 473, 488 “491

shift function, 195 “196

Shoot 'Em Up

background, 385 “386

clock, 406

crosshairs, 390, 405 “406

designing, 391 “395

files, 381 “391

foreground, 385 “386

frame counters, 388 “390

idea, 379 “381

implementing, 395 “414

initializing, 396 “399

instructions, 386 “387, 399 “402

libraries, 381 “391

listing, 418 “424

nesting conditional statements, 409

objects, moving, 406 “411

scoreboard, 388, 406

scripts, 385

sound, 414 “417

sound manager, 415 “416

starting, 402 “405

state machines, 399 “405

testing, 417 “418

timelines, 385

short-circuiting

collision response, 612

logical operators, 77 “78

show function, 289 “290

sine function, 443 “444, 446 “449

size

arrays, 186 “187, 195

browser windows , 676 “678

buttons , 168 “169

clips, 100

Critter Attack , 334

images, 31 “33

instances, 15 “16

movies, 15

scaleMode property, 291 “295

text, 15

vectors, 587 “588

skewing instances, 15 “16

skill levels ( Tic Tac Toe ), 551, 559

skipping, collision response, 613 “614

slash syntax, 309

slice function, 200 “202, 270 “272, 274

Sliders

buttons, 231 “232, 237 “240

conditional statements, 242

files, 230 “233

idea, 229 “230

implementing, 233 “244

libraries, 230 “233

listing, 245 “248

scoreboard, 232 “233, 237

testing, 236, 239 “244

tiles, 230 “231, 234 “236, 240 “243

SOHCAHTOA, 446 “449

sort function, 197 “200

sorting arrays, 197 “200

sortOn function, 200

sound

Blow 'Em Up , 491 “492

Critter Attack , 354 “357

exporting, 329

importing, 11 “12, 329

keyframes, 328

library, 9 “11

Shoot 'Em Up , 414 “417

sound manager, 415 “416

Sound object, 327 “332

event handlers, 332

functions, 329 “332

properties, 330

Sound object, 327 “332

event handlers, 332

functions, 329 “332

properties, 330

Space Invaders. See Critter Attack

speed. See also distance; moving

Critter Attack , 336

objects, 437 “439, 583

vectors

adding, 584 “585

components , 583 “584

component-wise multiplication, 588

dot product multiplication, 588 “590

initial points, 584

magnitude, 583

normalizing, 586 “587

overview, 582 “584

scalar multiplication, 585 “586

scaling, 587 “588

subtracting, 584 “585

terminal points, 584

spin, collision response, 614 “615

splice function, 202 “204

split function, 274 “275

SQL Web sites, 720

stacking clip instances, 113

stage

movies, troubleshooting, 10

objects

moving, 10

position, 107 “108

overview, 6 “7

properties, 13 “15

Stage object, 291 “298

listeners, 295 “296

properties, 291 “298

Stage object, 291 “298

listeners, 295 “296

properties, 291 “298

stageHeight property, 295

stageWidth property, 295

start function, 329 “330

startDrag function, 313 “315

starting

Blow 'Em Up , 457, 463 “466

Shoot 'Em Up , 402 “405

Tic Tac Toe , 546 “547, 550 “553

state, buttons, 150 “153, 171, 173 “178

state machines

designing, 375 “378, 399 “405

FSMs, 375

overview, 375

scripts, 377 “378, 399 “405

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

operators, 52 “54

Sliders , 242

switch, 60 “65

case clauses, 61 “64

default keyword, 64

expressions, 61

timelines, 385

variables , 51 “52, 70 “73

static functions, classes, 527 “528

static keyword, 527 “528

static properties, classes, 527 “528

static text fields, 12 “13

steps, designing games, 108 “109

stop function, 158 “159, 330

stopDrag function, 313 “315

stopping, 158 “159, 161

storing classes, 510 “511

stretching instances, 15 “16

string function, 279

String object, 265 “276

strings. See also text

case sensitivity, 266, 269, 276

string function, 279

String object, 265 “276

variables, 50 “52, 71 “73

stroke color , 10 “11

stubs (functions), 393, 517 “518

Substitute Font dialog box, 113

substr function, 272 “274

substring function, 273 “274

subtracting vectors, 584 “585

super keyword, 518

superclasses, 514 “518

swapDepths function, 320

Swift 3D Web sites, 720

switch statements, 60 “65

break statements, 61 “62

case clauses, 61 “64

default keyword, 64

expressions, 61

symbols

button menu, 165

classes, 512 “513

creating, 8 “9

editing, 8 “9

exporting, 130 “131

libraries, 11 “12, 130 “131

naming, 32

scripts, 390

syntax

classes, 507 “508

errors

reports , 35 “36

troubleshooting, 47

functions, 86 “87

slash (/), 309

System object, 298

Категории