Adobe Flash Platform Flashcards

(41 cards)

1
Q

are blocks of code that carry out specific tasks and can be reused in your program.

A

Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A function is called a _ if you define it as part of a class definition or attach it to an instance of an object. A function is called a _ if it is defined in any other way.

A

method, function closure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You call a function by using its identifier followed by the parentheses operator (()).

A

calling function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You use the _ to enclose any function parameters you want to send to the function.

A

parentheses operator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

use the Math.random() method, which takes no parameters, to generate a random number:

A

var randomNum:Number = Math.random();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define your functions with _ if you prefer static, or strict mode, programming.

A

function statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define your functions with _ if you have a specific need to do so; are more often used in dynamic, or standard mode, programming.

A

function expressions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A function statement begins with the _, followed by:

The function name

A

function keyword

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The _, in a comma-delimited list enclosed in parentheses

A

parameters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The _—that is, the ActionScript code to be executed when the function is called, enclosed in curly brackets

A

function body

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

the following code creates a function that defines a parameter and then calls the function using the string “ hello” as the parameter value:

A
function traceParameter(aParam:String)
 { 
trace(aParam); 
} 
traceParameter("hello"); // hello
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The second way to declare a function is to use an assignment statement with a function expression, which is also sometimes called a _ or an _. This is a more verbose method that is widely used in earlier versions of ActionScript.

A

function literal, anonymous function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

An _ with a function expression begins with the var keyword

A

assignment statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Mouse events such as a button click, double-click, or simply moving the mouse are handled by the _.

A

MouseEvent class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Since the _ is one of the primary means through which a user interacts with a Flash movie, it’s important to understand how to listen and respond to mouse events.

A

mouse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The simplest event is the _, which happens when the user presses and then releases the mouse button.

A

button click,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

You can detect and respond to a button click by first attaching a listener to the _ (referred to as stage) and using the property MouseEvent.CLICK as follows:

18
Q

If you want to detect a click on a particular object, use the _ instead of the word stage.

A

object’s name

19
Q

Flash can listen for a mouse event on any object of the _ displayed on the Stage

A

InteractiveObject class

20
Q

Happens when the mouse button is clicked

21
Q

Happens when the mouse button is clicked twice in rapid succession

22
Q

Happens when the mouse pointer moves

23
Q

Happens when the mouse button is pressed

24
Q

Happens when the mouse button is released

25
Happens when the mouse moves from a nontarget area over a target area
mouse_over
26
Happens when the mouse moves from a target area out of the target area
MOUSE_OUT
27
Happens when the mouse wheel is rotated
MOUSE_WHEEL
28
The _ requires an additional bit of code to work properly
MouseEvent.DOUBLE_CLICK
29
The property _ for the button instance must be set to true for double-click events to be captured.
doubleClickEnabled
30
instead of MouseEvent.CLICK, you can use _
"click"
31
instead of MouseEvent.MOUSE_UP, you can use _
"mouseUp".
32
Check the _ for the full list of shortcuts.
Flash Help Action-Script Language Reference
33
features of programming languages that tell the computer to execute certain actions, provided certain conditions are met.
Conditional statements, expressions, or simply conditionals
34
_ are used through the various programming languages to instruct the computer on the decision to make when given some conditions. These decisions are made if and only if the pre-stated conditions are either true or false, depending on the functions the programmer has in mind.
Conditional statements
35
The _ allows you to test a condition and execute a block of code if that condition exists, or execute an alternative block of code if the condition does not exist.
if..else conditional statement
36
the following code tests whether the value of x exceeds 20, generates a trace() function if it does, or generates a different trace() function if it does not:
``` if (x > 20) { trace("x is > 20"); } else { trace("x is <= 20"); } ```
37
You can test for more than one condition using the _ conditional statement.
if..else if
38
If an if or else statement is followed by only one statement, the statement does not need to be enclosed in _
curly brackets
39
The _ is useful if you have several execution paths that depend on the same condition expression. It provides functionality similar to a long series of if..else if statements, but is somewhat easier to read.
switch statement
40
Instead of testing a condition for a _, the switch statement evaluates an expression and uses the result to determine which block of code to execute.
Boolean value
41
Blocks of code begin with a _ statement and end with a _ statement.
case, break