{ } (curly braces), 33
= =, 43
( ) (parentheses), 33
++ characters, 23
+=, 53
“ “ (quotation marks), 27
“/n
/n
”, 306
../, 190
/* and */ tags, 184
//, 184
access modifiers, about, 72
Actions panel, 16–18
ActionScript. See also external ActionScript files; third-party ActionScript libraries; writing ActionScript
ActionScript cue points, 244–246, 260
adding toggle functionality, 161–164
AIR-specific classes in, 322–323
case sensitivity of, 33
casting data for, 241
changes in version 3.0, 11–12
class creation for, 68–70
coding custom menus for AIR, 330
controlling movie clip instances with, 124–126, 148
creating variables, 22–23
empty lines between code sections, 40
evolution of Flash and, 9–10
external code files for, 13, 36, 66, 68
files in, 68
generating cue points automatically, 247
hexadecimal color and, 74
hints for debugging, 62
ID3 tag compatibility with, 196
learning version 3.0, 10
listening to and responding to events, 32–34
locating XML elements in, 214, 227
managing FLVPlayback properties in, 236–238
manipulating IK systems from, 264, 265
naming rules in, 33
placing in Timeline frames, 13, 16–17
playing back files for Flash and, 12
preventing runtime errors with, 312–313, 318
runtime IK in, 266
sending variables to PHP script, 304–305
setting FLVPlayback source
property, 242
streaming video using classes in, 367–374, 376
TLF formatting with, 152
tweens for animation, 57–58
using third-party libraries with, 344
working with live camera feeds, 277–282
writing for CLICK
events, 34–39
XML support in, 206
ActionScript for Adobe Flash CS5 Classroom in a Book CD, 2
ActionScript Virtual Machine 1 (AVM1), 11
addChild()
method, 75, 298, 299, 317, 318
addEventListener()
method, 32, 200
addPage()
method, 309, 317, 318
Adobe
Community Help, 5–7
training and certification, 7
updating software, 4
Adobe CS Live, 8
Adobe Flash. See Flash CS5
Adobe Integrated Runtime. See AIR applications
Adobe Media Encoder, 243
Adobe Updater, 4
AIR applications, 320–341
about, 322
ActionScript classes for, 322–323, 341
coding custom menus for, 330
creating, 328–330
digital signature for, 326–328, 341
drag-and-drop functionality for, 333–340
Flash publish settings for, 324–328, 341
looping through file-type arrays, 336–339
printing from, 332–333
reviewing lesson file for, 330–332
using, 12
working with clipboard, 334
album information, 197–199
alternate video scripts, 281, 284
animation, 48–65. See also cube animation; Fruit Basket game; IK
ActionScript tweens for, 57–62
activating cube animation with spacebar, 358–361
authortime and runtime IK for, 266
ENTER_FRAME
event for, 53–54
falling fruit at random speeds, 130–131
looping, 21–22
modifying text fields in, 41–42
moving joints in IK armature, 270–275
restart button for, 40–41
rotating 3D cube, 360, 361–363
sound added to armature, 275–277
storing clip references in variables, 54–56
triggering armature, 271–275
tweens and easing classes, 58, 59–62
appendText()
method, 203
Application & Installer Settings dialog box, 326, 327
armature
moving joints in, 270–275
sound effects for animation, 275–277
triggering animation of, 271–275
working with multiple, 269
array notation, 227
arrays
about, 127
adding songs to playlist, 185
creating and referring to, 127–128
reviewing lesson file for, 122–123
searching file types with for
loops, 336–339
splicing elements from, 140
storing in variable, 149
artist information
formatting, 197–199
modifying for XML playlist, 216–218
.as files. See external ActionScript files
audio. See sound; music player
authortime IK, 266
Bandwidth Profiler tool, 103–105, 119
base class, 125
BasicView
class
extending, 351–352
making instances interactive, 353–354
onRenderTick()
function of, 358–361
BitMap
class, 282–284
bitmap graphics
classes for, 282
creating in ActionScript, 299
placing on 3D cube, 355–358, 376
storing image in variable, 282–284
BitMapData
class, 282–284, 299
BitmapFileMaterial
instance, 355–356
buttons
adding event listeners to song, 189
changing movie clip properties with, 56–57
changing variable value with, 42–45
event-handling functions for, 32–34
restart, 40–41
Take A Snapshot, 271
triggering navigation with, 34–39
updating song labels on, 224–225
URL navigation with, 17–18
XML playlist, 223–225
calling functions, 37
camel case, 33
cameras. See live camera feeds
casting data, 241
Caurina Transitions library
about, 344
testing installation of, 346–347
Tweener
class of, 361–363, 376
certification programs, 7
CHANGE
event
associated with ColorPicker, 239, 240
changeHandler()
function, 240, 241
changeVid()
function, 253–256
chooseSong()
function, 189–190, 219–221
class files
adding new instances of, 59, 74, 76–77
assigning for external libraries, 349
constructor functions and, 71, 82, 353–354
creating, 68–70
functions and variables in, 69
structure of, 70–73
classes. See also class files; and specific classes
access modifiers for, 72
adding instance to Flash Stage, 126
AIR-specific ActionScript, 322–323, 341
importing IK, 268–269
inheritance and base, 125
methods and properties of, 69
MovieClip
and Object,
131
overriding functions from parent, 359–360
Papervision3D animation, 351–352
used by ActionScript for streaming video, 367, 376
working with sound, 178, 183, 203
CLICK
events
adding event listeners for, 52–53
adding to nested movie clips, 365–366
changing movie clip properties with, 56–57
responding to MOUSE_DOWN
and MOUSE_UP
events, 133
using in interactive 3D events, 356–357
writing ActionScript for, 34–39
client
property, 367
ClipboardFormat
feature, 334
code completion in Flash, 26
code snippets, 16–20
adding to button instance, 36–37
applying, 18–19
comments for, 19–20
creating navigation with, 34–39
creating tween with, 63
defined, 17
navigating to URL with, 17–18
Code Snippets panel, 17
collision detection, 137–140
color
adjusting skin, 234–235
formatting text, 166–167
ColorPicker component, 154, 239–240
comments
about code snippet, 19–20
accessing XML, 207
adding to ActionScript, 184
COMPLETE
event
about, 227
acknowledging completed loading with, 94–96, 99
completeHandler()
function for, 109, 111–112
timing of FLVPlayback component, 252, 260
URLLoader
response to, 211–212
completeHandler()
function, 109, 111–112
Component Inspector, 18
Component Parameters list, 233, 234, 236
concatenating text, 42, 47, 306
conditional statements, 25–28
about, 27
adding, 25–26
checking key presses with, 162–164
determining game outcome with, 141–143, 148
switch
statements, 189–190
updating home
frame text, 26
constructor functions
creating for Cube3D
class, 353–354
copying lesson files, 2–3
count variables, 22–25
CS Live services, 8
cube animation. See also Cube3D
class
about cube surfaces, 355
activating zooming with, 358–362
coding as interactive 3D event, 356–357
completed version of, 347
creating and modifying 3D cube, 354, 355–357
Cube3D
constructor function, 353–354
displaying movie clips on cube, 363–367, 376
elements needed for, 351
extending BasicView
class, 351–352
including streaming video, 366–374, 376
lesson files provided for, 348–349
navigating to URL from movie link, 365–366
placing cube on Flash Stage, 357–358
showing new cube face on click, 362–363
variables for Cube3D,
352
Cube3D
class
constructor function for, 353–354
extending BasicView
class, 351–352
variables for, 352
Cube3D.as file, 350–351
cue points, 242–246
defined, 242–243
generating automatically, 247
uses for, 246
CUE_POINT
event, 245
curly braces ({ }), 33
Date
class, 310
digital signatures, 326–328, 341
display objects
about, 75
adding to display list, 83
using as Papervision3D material, 363
video
instance as, 279
DisplayObject
class, 367
estimating time for, 103–105
external libraries, 344–345
drag-and-drop functionality
adding to formatClip
panel, 165–166
making draggable objects, 132–134
setting up AIR applications, 333–340
elements
accessing data from XML, 214
parent and child tags, 207–208
ellipses. See trail of ellipses
email, 300–318
creating pages to print, 311–312, 318
examining lesson files for, 302
linking to external email applications, 302–304
mailto:
syntax for, 303
sending to external URL, 305
user-activated variables for sending, 306–308
using date and time on, 310
ENTER_FRAME
event
animating movie clip with, 53–54
catching fruit with, 134–135
triggering armature animation with, 271–275
errorHandler
function, 212
errors
checking for loading, 191
improved checking and feedback for, 12
preventing ActionScript runtime, 312–313, 318
reviewing during testing, 147
event-handling functions, 32, 33
event listeners
adding restart button with, 40–41
adding to thumbnails gallery, 91–93
button instance with, 36–37
CLICK
events with, 52–53
ID3 tag, 195–196
including in mouse events, 32–33
removing, 78–79
responding to completed loading, 94–96, 99
song button, 189
triggering with snapshot, 271
using PROGRESS
and COMPLETE
with loading, 109, 119
events. See also CLICK
events; event listeners; keyboard events; mouse events
animation using ENTER_FRAME,
53–54
creating interactive 3D, 356–357
listening for FLVPlayback COMPLETE,
252
listening to and responding to, 32–34
MouseEvent,
32–33
naming conventions for, 32–33
responding to MOUSE_DOWN
and MOUSE_UP,
133
syntax for, 32
URLLoader
response to COMPLETE
and IO_ERROR,
211–212
working with, 32
extends
keyword, 71
external ActionScript files, 66–83
class file structure, 70–73
confirming loading of, 94–96
creating class file instances, 74, 76–77
creating custom classes, 68–70
importing classes to Flash, 182
loading to TLF text fields, 158–159
overriding instance parameters, 77–78
randomizing ellipse color, 79–81, 83
required vs. optional parameters, 73
text loading from, 93–94
workflow with, 349
external libraries. See third-party ActionScript libraries
feeds. See live camera feeds
files. See also class files; external ActionScript files; MP3 files; SWF files
ActionScript .as, 70–73
connecting Timed Text to FLVPlaybackCaptioning, 248–249
creating AIR, 328–330
downloading external library, 344–345
dragging and dropping in AIR applications, 335–336
loading SWF with UILoader component, 89–90
loading thumbnail, 91–96
PBFilter.as, 288–289
PNG, 325
SVN, 344-345
SWC, 345
XML, 206–208
ZIP, 344-345
FileStream
class, 336–339, 341
filter_btn
instance, 291–293
filters
adding live filtering, 289–296
applying from Pixel Bender, 285–287
changing parameters with slider, 293–296, 299
creating PBFilter
class interactively, 291–293
reviewing PBFilter.as file, 288–289
testing Pixel Bender, 285
Flash Builder 4, 12–13
Flash CS5. See also display objects; Flash Stage; Flash Timeline; and specific components
about import
statements, 182, 350
ActionScript class for, 68–70
adding email link to projects in, 302–304
adding FLVPlayback component, 231–232
animation features of, 48
assigning class file for external libraries, 349
automatic insertion of import
statements, 54, 350
Bandwidth Profiler tool, 103–105, 119
class file instances in, 74, 76–77
code completion feature, 26
creating AIR applications with, 322, 324–328, 341
cue points, 242–246
display objects and display list, 75
elements needed for Papervision3D projects in, 351
evolution of ActionScript and, 9–10
hardware requirements for, 2
installing and optimizing, 2
live camera access in, 277, 281
opening XML files in, 206
playing back ActionScript files for, 12
ProgressBar component, 107, 110, 113
sending email from, 304–308
setting FLVPlayback properties, 233–235
setting preferences for external libraries, 345–346
Simulate Download tool, 105–106, 119
streaming video using ActionScript classes, 367–374
tools for inverse kinematics, 264
updating, 4
using ActionScript version 3.0 with, 11–12
using movie clips from library, 123–125
working with List component, 86–88
Flash Player. See also live camera feeds
camera access to, 281
version used, 5
Flash Stage
adding class instance to, 126
adding UILoader instance to, 88
measurements of, 51
placing external library objects on, 357–358
width of, 54
Flash Timeline
ActionScript in frames vs. external files, 13, 36
adding ActionScript to frames on, 13, 16–17
animating with IK, 266
controlling, 25–28
keyframe labels on, 20–21
placing code on, 20–26
scrubbing through, 16
testing code snippets from, 19, 20
Flex Builder, 12
FLVPlayback component
about, 260
adding instance of, 231–232
bypassing with Papervision3D materials, 366–367
controlling properties with ActionScript, 236–238
enabling full-screen viewing, 256–258
listening for COMPLETE
event, 252, 260
property settings for, 233–235
setting skin color and transparency, 234–235
skin
property for, 234
source
property of, 242
FLVPlaybackCaptioning component, 247–249, 260
for
loops
about, 129
creating, 130–131
searching dragged file name suffixes with, 336–339
using trace
statements in, 130
formatClip
panel
creating instance of Formatter movie clip for, 160–161
making draggable, 165–166
responding to user’s keyboard events, 161–164, 174
text formatting with, 166–168
Formatter movie clip
about, 153
creating instance of, 160–161
responding to user’s keyboard events, 161–164, 174
formatting
artist and album properties, 198–199
frames
adding ActionScript to Timeline, 13, 16–17
adding labels to, 20–21
tying to loading progress, 114–118
Fruit Basket game
adding class instance to Stage, 126
adding fruits to, 132
adding visual feedback to, 143–147
catching fruit with ENTER_FRAME
event, 134–135
collision detection in, 137–140, 149
creating for
loops for, 130–131
detecting when fruit hits basket, 136–137
determining game outcome, 141–143, 148
dragging and dropping basket, 132–133
layers in Basket clip, 122–123
listing fruit movie clips as arrays, 127–128
splicing elements from arrays, 140
tracking clips leaving Stage, 136–140
functions. See also specific functions and methods
calling, 37
defined, 33
event-handling, 32–34
naming, 33
overriding, 359–360
syntax for writing, 33–34
gotoAndStop()
method, 22
graphics. See also bitmap graphics; IK; trail of ellipses
ActionScript bitmap, 299
bitmap classes, 282
creating impression snapshot taken, 271–275
icons for AIR applications, 325–326, 341
IK, 264–266
placing on 3D cube, 355–358, 376
storing in variable, 282–284
vector, 72–73
hardware requirements for Flash, 2
help resources, 5–7
hiding/showing
interface elements when filtering snapshots, 290–291
movie clips, 56–57
sliders, 188–189
hitTestObject()
method, 137–140, 149
home
frame
adding conditional statement to, 25–26
updating text for, 26–28
icons for AIR applications, 325–326, 341
ID3 tags
checking and setting in iTunes, 196
compatible versions of, 196
using artist and album information from, 197–198
id3Handler()
function, 195, 197
if...else
statements. See conditional statements
ignoreComments()
method, 207
IK (inverse kinematics). See also armature
about, 264
adding moveDown()
function, 271–274, 276–277
authortime and runtime, 266
coding moveUp()
function, 274–275, 276, 277
connecting graphics in, 264–265
importing classes for, 268–269
moving joint in armature, 270–275
reviewing files for, 266–268
sound effects for, 275–277
IKArmature
class, 269–270
IKMover
class, 270–271
import
statements
automatic insertion of, 54, 350
importing
external ActionScript classes to Flash, 182, 350
IK classes, 268–269
Tween
class, 59–62
index values of arrays, 128, 149
inheritance, 125
installing third-party ActionScript libraries, 344–345
instances. See also specific instances
adding new ActionScript class, 59, 75
checking for existing Sound
class, 191
creating class file, 74, 76–77
syntax for new tween, 58
working with Sound
, SoundChannel
, and SoundTransform,
183–184, 191–193
interactive content, controlling user-activated tweens, 362–363
interactive features. See also cube animation; Fruit Basket game; trail of ellipses
class parameters detecting interactivity, 353
creating PBFilter
class interactively, 291–293
live camera feeds, 277–282
live tracking of filter values, 293–296, 299
sound and, 176
using user-activated cue points in video, 242–246
internal
access modifier, 72
inverse kinematics. See IK
IO_ERROR
events
about, 227
URLLoader
response to, 211–212
iTunes
checking and setting ID3 tags, 196
linking songs to, 209, 221–223
joints in IK armature, 270–275
keyboard events
animating 3D cube with spacebar, 347, 358–362
formatting text with user’s key presses, 161–164, 174
keyCheck
function, 162
keyframes. See frames
labels
adding to keyframes, 20–21
adding to XML playlist, 213, 215
updating song, 224–225
languages, 42–45
lesson files
copying, 2–3
Flash Player version used with, 5
using, 3
libraries. See also third-party ActionScript libraries
about third-party ActionScript, 344
Flash CS5, 124–126
links
adding email, 302–304
linking songs to iTunes, 209, 221–223
mailto:
syntax for email, 303
setting movie clip properties, 124–125
List component
about, 86
adding CHANGE
event listener to, 89
setting parameters for, 86–88
live camera feeds, 277–282
checking for online cameras, 278–282
displaying, 298
filtering snapshots from, 289–296
Flash access for, 281
single camera access only in Flash, 277
taking snapshots from, 282–284
load()
method, 227
loading content, 84–99. See also preloaders
adding external text to text field, 158–159
adding SWF files into UILoader, 89–90
checking for loading errors, 191
completing loading, 111–112
confirming loading of external content, 94–96, 99
loading text from external files, 93–94
monitoring loading progress, 109–112
preloaders and, 102
reviewing and uploading thumbnail files, 91–96
showing loading progress, 113–118
tracking loading progress, 108–112
loops. See also conditional statements; for
loops
conditional statements controlling, 25–28
counting number of, 22–25
creating animation, 21–22
modifying text fields dynamically, 41–42
reviewing lesson file for, 122–123
makeCube()
method
making cube with, 354, 355–357
using streaming video instances within, 367–370
materials. See 3D materials
menus in AIR, 330
methods. See also functions
defining parameters for, 72–73
microphone access, 281
moreSongs()
function, 224
mouse events
adding green ellipses in trail, 77–78
creating graphic trail with, 74, 76–77
including event listeners in, 32–33
MOUSE_DOWN
and MOUSE_UP,
133
MOUSE_MOVE
event, 76
navigating to URL from 3D material with, 365, 370, 373
providing random color for trail, 79–81
removing event listeners with, 78–79
MOUSE_DOWN
and MOUSE_UP
events, 133
MOUSE_MOVE
event, 76
moveDown()
function, 271–274, 276–277
moveUp()
function, 274–275, 276, 277
movie clips
adding CLICK
event to nested, 365–366
buttons for changing properties, 56–57
changing properties of, 50–51
checking for collisions of, 137–140, 149
connecting for IK, 264–265
controlling instances with ActionScript, 124–126, 148
games with visual feedback, 143–147
hiding/showing, 56–57
making draggable object, 132–134
playing animation while new content loads, 114–118
setting linkage properties of, 124–125
storing references in variable, 54–56
tracking clips leaving Stage, 136–137
triggering by loading process, 113–114
using with 3D object, 355, 363–367, 376
MovieAssetMaterial
class
adding CLICK
events to movie in, 365–366
adding 3D materials with, 363–365
parameters of, 364
using symbol from Flash library in, 363
MP3 files
adding sound effects, 275
ID3 tags in, 195–198
reading text data in, 183
removing file suffix from title, 187–188
music player. See also playlists
adding artist and album data in, 197–198
adding sliders to, 180–181
controlling song volume and panning, 200–201
creating playlist array, 185
declaring variables for current songs, 185
displaying song titles, 185–187
hiding sliders, 188–189
illustrated, 177
removing file suffix from title, 187–188
reviewing files for, 178–180
selecting songs with buttons, 189–193
stopping current and starting new song, 191
/n
tag, 198
naming
constructor functions, 71, 82, 353
events, 32–33
functions and classes, 33
NATIVE_DRAG_DROP
event, 333–334, 341
NATIVE_DRAG_ENTER
event, 333–334, 341
NativeDragEvent
class, 333, 341
navigation
buttons on XML playlist, 223–225
labels and, 20–21
using cue points for, 243
Navigation cue points, 244, 260
NetConnection
class, 367–374
NumericStepper component, 154
Object
class, 131
objects
placing external library objects on Flash Stage, 357–358
onClick()
function, 362–363
onDragDrop()
function, 335, 336
online resources, 8
onRenderTick()
method, 358–361
onSnapshot()
function, 271
operating system
communicating printing capabilities of, 309
using clipboard for AIR applications, 334
optional parameters, 73
overriding functions, 359–361
pageSprite
instance, 313–315
panChange()
function, 200–201
panning
controlling current song’s, 200–201
creating slider for, 180–181
displaying sliders for, 193–194
hiding slider for, 188–189
setting values for, 192
SoundTransform
instances and, 180–181, 192
paper width and height, 312–313
Papervision3D
about, 344
activating animation with spacebar, 347, 358–361
adding movies to 3D object, 363–367, 376
bypassing FLVPlayback component with, 366–367
classes for, 351–352
creating 3D cube with, 355–357
extending BasicView
class, 351–352
testing installation of, 346–347
parameters
defined, 33
including in functions, 71–73, 82
MovieAssetMaterial
class, 364
overriding instance, 77–78
replace()
method’s, 187
required vs. optional, 73
setting Cube3D
class constructor function, 353–354
setting List component, 86–88
startDrag()
m, 134
parent and child tags, 207–208
parentheses ( ), 33
PBFilter.as file, 288–289
PHP files
confirming received email, 307, 308
sending ActionScript values using URLVariables
class, 305
using ActionScript variables in, 304–305
Pixel Bender Toolkit 2
adding live filtering to snapshots, 289–296
applying filters from, 285–287
examining PBFilter.as file, 288–289
playlists. See also XML playlist
adding songs to, 185
removing file suffix from titles in, 187–188
replacing songList
array with XML instance, 209–210
PNG format, 325
Preferences dialog box, 345
preloaders, 100–119
completing loading, 111–112
defined, 102
Flash troubleshooting tools, 102–106
monitoring loading progress, 109–112
progress bars and text field for, 106–107
reflecting loading progress, 113–118
tracking progress of UILoader component, 108–112
previewing Flash projects, 19, 20
print_btn
button, 309
printing, 309–317
about PrintJob
class, 309, 311, 332–333
adding date and time to email, 310
from AIR applications, 332–333
preventing runtime errors when, 312–313, 318
sending jobs to printer, 313–317
starting and adding pages to, 311–312, 318
PrintJob
class
AIR-only properties for, 332–333
using with Flash-based emails, 309, 311
private
access modifier, 72
progress bars, 106–107, 110, 113
PROGRESS
event, 109, 119, 212, 227
progressHandler()
function, 109–112
properties
ActionScript control of FLVPlayback, 236–238
buttons changing movie clip, 56–57
changing movie clip, 50–53
changing values for, 51–52
ENTER_FRAME
event animation for movie clip, 53–54
formatting with TextFormat
class, 159–160, 174
setting FLVPlayback, 233–235
setting TLFTextField,
157, 174
Properties panel, 87
Property Inspector
about, 18
Component Parameters list, 233, 234, 236
protected
access modifier, 72
public
access modifier, 72
Publish Settings dialog box, 257
publish settings for AIR applications, 324–328, 341
quotation marks (“ “), 27
removeEventListener()
method, 78
removing event listeners, 78–79
replace()
method, 187–188, 203
required parameters, 73
resources
help, 5–7
online, 8
rotating 3D cube, 360, 361–363
runtime. See also AIR applications
formatting text at, 160–161
preventing printing errors at, 312–313, 318
runtime IK, 266
scroll bar
adding for text fields, 97–98, 168
showing/hiding, 169–172
scrubbing through Flash Timeline, 16
Select Skin dialog box, 235
send()
method, 309, 313, 314, 318
sending email from Flash, 304–308
servers, confirming loading from, 95
setLanguage()
function, 43–44
setSongs()
function, 213, 215, 218–219
Shader
classes, 285
Simulate Download tool, 105–106, 119
skin. See video skin
skin
property, 234
sliders
adding to music player, 180–181
adjusting video transparency, 236–238
controlling song volume and panning, 200–201
displaying, 193–194
hiding, 188–189
live tracking of filter values with, 293–296, 299
snapshots
hiding interface elements when filtering, 290–291
initiating animation with, 271
live filtering of, 289–296
sound effects triggered by, 276–277
taking from video feed, 282–284
triggering graphic and animation with, 271–275
songs
accessing title and artist data, 216
adding event listeners to buttons for, 189
controlling volume and panning of, 200–201
creating songList
array for, 185
declaring variables for current, 185
displaying titles in music player, 185–187
formatting artist and album data, 198–199
functions for selecting, 189–190
linking to iTunes, 209, 221–223
removing file suffix from title, 187–188
selecting more, 224
setting title and artist fields in XML, 216–218
setting title with for
loop, 185–187
stopping and starting, 191
sound. See also songs
about, 176
adding to animation, 275–277
classes working with, 178, 183–185, 203
declaring variables for current songs, 185
loading to Sound
instance, 191
working with Sound
, SoundChannel
, and SoundTransform
classes, 183–184, 191–193
Sound
class
creating armature sound effects, 275–277
creating instances of, 183–185, 191
loading sound to instance, 191
SoundChannel
class
creating armature sound effects, 275–277
creating instances of, 183–185, 191–193
SoundTransform
class
creating instance for, 191–193
creating instances of, 183–185
spacebar key press, 347, 358–362
Stage. See Flash Stage
start()
method, 309
startDrag()
method, 132–134
startRendering()
method, 354
stopDrag()
method, 132–133
strings
casting data as, 241
recasting text fields to, 25
subtitles, 247
SVN files, 344–345
SWC files, 345
SWF files
AIR applications capabilities vs., 322, 323, 333
loading, 89–90
publishing as AIR project, 324–325
skin files as, 235
viewing in browsers, 320
switch
statement, 189–190, 191
Symbol Properties dialog box, 124, 125
symbols in IK systems, 264–265
syntax
array, 127
changing movie clip properties, 51
describing Stage width, 54
event, 32
improved ActionScript 3.0, 11
loading files into UILoader, 89
trace
statement, 130
tween variable, 58
writing functions, 33–34
tags
/* and */, 184
ID3, 195–198
XML, 207–208
Take A Snapshot button
adding event listener for, 271
triggering sound effects with, 276–277
testing
about, 102
Bandwidth Profiler tool for, 103–105, 119
code snippets from Timeline, 19, 20
Flash tools for, 102–106
hints for debugging and, 62
installed external libraries, 346–347
looping animation, 21
Pixel Bender filters, 285
reviewing errors during, 147
Simulate Download tool for, 105–106, 119
text. See also text fields
about Flash, 152
displaying scroll bar based on display of, 169–172
formatting with formatClip
panel, 166–168
keyboard events formatting, 161–164, 174
loading from external files, 93–94
reviewing lesson file for, 152–156
runtime formatting of, 160–161
text fields
adding scroll bar for, 97–98, 168
adding video player title’s, 244
concatenating text in, 306
creating TLF, 156–157
cue points triggering changes in, 243–246
determining language of, 42–45
displaying count variables in, 24–25
formatting with TextFormat class, 159–160, 174
linking email to, 318
loading files to generated, 158–159
modifying dynamically, 41–42
preloader, 106–107
recasting as strings, 25
replace()
method modifying, 187–188
replacing text in, 187–188
showing/hiding scroll bar, 169–172
Text Layout Framework. See TLF
TextFormat
class, 159–160, 174
textLoaded()
function, 158
third-party ActionScript libraries
about, 344
animating cube with spacebar, 358–362
assigning class file for, 349
constructor function for Cube3D
class, 353–354
creating 3D cube from Papervision3D, 355–357
downloading and installing, 344–345
examining ending lesson files for, 347
extending Papervision3D BasicView
class, 351–352
including streaming video using, 366–374, 376
inspecting Cube3D.as class file, 350–351
placing external library objects on Stage, 357–358
reviewing starting files for, 348–349
rotating cube with Caurina Tweener, 361–363
setting Flash preferences to, 345–346
testing installed libraries, 346–347
variables for Cube3D
class, 352
this
keyword, 186
3D materials. See also cube animation
adding with MovieAssetMaterial
class, 363–365
placing bitmap graphics as, 355–358, 376
setting interactive
property for, 356
streaming video, 355, 366–374, 376
using Papervision3D, 344, 355, 376
THUMB_DRAG
event, 293–296, 299
thumbnails
adding event listeners to loading, 91–93
examining, 91
time printed on emails, 310
Timed Text format
connecting files to FLVPlaybackCaptioning component, 248–249
illustrated, 247
titles
accessing from XML data, 216
adding text field for video player, 244
displaying, 185–187
modifying for XML playlist, 216–218
removing MP3 suffix from, 187–188
TLF (Text Layout Framework)
creating TLF text fields, 156–157
formatting with ActionScript, 152
loading external files to TLF text fields, 158–159
TLFTextField
class
importing and creating instance of, 156–157
toggle functionality, 161–164
trail of ellipses
creating class file for, 70–73
creating multiple ellipse instances, 74, 76–77
overriding color of, 77–78
randomizing color of, 79–81, 83
stopping when mouse released, 78–79
training and certification programs, 7
transparency
adjusting values for, 52
skin, 234–235
slide adjusting video, 236–238
try/catch
statements, 312–313, 318
Tweener
class, 350, 361–363, 376
tweens, 57–62
about, 57–58
adding, 59–62
controlling user-activated, 362–363
creating with code snippet, 63
new instances of, 59
rotating 3D cube with, 361–363
UILoader component
adding instance to Stage, 88
loading SWF files into, 89–90
PROGRESS
event for, 119
review of, 99
tracking percent loaded, 110
tracking progress of, 108–112
UIScrollBar component, 97, 168
updating
Adobe software, 4
chooseSong()
function, 219–221
count variables, 23
home
frame text, 26
song labels on buttons, 224–225
URLLoader
class
acknowledging completed loading, 94–96, 99
creating for and loading XML playlist, 210–211
creating instance of, 93–94
load()
method of, 227
loading text to generated text files, 158–159
responding to COMPLETE
and IO_ERROR
events, 211–212
using COMPLETE
event with, 99
URLs
navigating from nested movie clip to, 365–366
omitting spaces between names and values in, 303
sending email to server’s, 304–308
URLVariables
class, 305–308, 318
users
additional resources for, 5–7
formatting text at runtime, 160–161
score in Fruit Basket game, 127, 128
values
changing movie clip property, 51–52
sending using URLVariables
class, 305–308
setting volume and pan, 192
spaces between ActionScript names and, 303
working with true,
164
var
keyword, 23
bitmap image stored in, 282–284
creating count, 22–23
Cube3D
class, 352
declaring for current songs, 185
determining language of text with, 42–45
displaying count, 24
sending email using URLVariables
class, 306–308
storing movie clip references in, 54–56
syntax for tween, 58
tracking user’s score with, 128
using wildcards as, 278
vector graphics, 72–73. See also trail of ellipses
video
streaming to 3D object, 366–374, 376
using as 3D object material, 355, 376
video cameras. See live camera feeds
video player, 228–260
adding instance of FLVPlayback component, 231–232
adding title text field, 244
full-screen view for, 256–258
identifying next video in playlist, 253–256
loading next video on playlist in, 252–253
playing videos from playlist, 250–256
reviewing folder for, 230
setting source
property of FLVPlayback component, 242
skin background color for, 240–242
storing captions in XML file, 247–249
viewing code in vidlist.xml file, 250–251
video skin
about skin files, 235
background color of, 240–242
color and transparency settings for, 234–235
VideoAssetMaterial
class, 366–367, 372
videos. See also video player
selecting from XML playlist, 250–256
using cue points, 242–246
viewing full-screen, 256–258
VideoStreamMaterial
class, 367, 369–370, 372
vidlist.xml file
using xmlLoaded()
function with, 252–253
viewing code in, 250–251
volume
controlling song, 200–201
creating slider for, 180–181
displaying sliders for, 193–194
hiding slider for, 188–189
values for, 192
volumeChange()
function, 200–201
webcams. See live camera feeds
writing ActionScript. See also external ActionScript files; naming
calling functions, 37
case sensitivity in, 33
casting data, 241
changes in version 3.0, 11–12
creating new instances, 59, 75
dot and array notation in, 214, 227
empty lines and, 40
learning version 3.0, 10
modifying code snippets, 19–20, 38–39
organizing addEventListener()
calls together, 200
spaces between names and values, 303
XML. See also XML
class; XML playlist
about, 206
accessing comments via ActionScript, 207
accessing data from elements, 214
file structure of, 206–208
storing captions in, 247–249
XML
class
about, 227
creating instances of, 210–211
ignoreComments()
method of, 207
XML playlist, 204–227
accessing title and artist from XML data, 216
adding call to setSongs()
function, 218–219
creating XML
and URLLoader
class instances, 210–211
identifying next video in, 253–256
illustrated, 205
labeling onstage song clips, 213, 215
linking songs to iTunes, 209, 221–223
loading, 211
moving event listeners to xmlLoaded()
function, 213
navigating through, 223–225
providing multiple video files in, 250–256
replacing songList
array with XML instance, 209–210
reviewing starting file for, 208–209
selecting more songs, 224
setting title and artist fields in XML, 216–218
updating chooseSong()
function for, 219–221
updating song buttons, 224–225
xmlLoaded()
function, 212, 213, 252–253
3.138.105.124