Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
21 Cards in this Set
- Front
- Back
A player's score would most likely have what data type?
|
int (integer)
|
|
What is the syntax and structure for creating a custom function with two parameters?
|
function.convert(a,b) {
} |
|
What is a return value?
|
When a fuction does some action, and gives you a response.
(tracing) |
|
How do you determine if one movie clip collides with another?
|
hitTestObject()
ex- a_mc.hitTestObject(b_mc) |
|
One advantage of hitTestObject and one disadvantage.
|
advantage - simple to implement
dis - slow to process , inaccurate |
|
What is the code that will generate a random number between 4-7?
|
Math.floor(Math.random()*7+4);
|
|
What is the code that will generate a random number between -5 & 2?
|
Math.floor(Math.random()*8+-5);
|
|
What are custom properties?
|
not predefined, a property that you make up.
|
|
Two examples of custom properties?
|
speed & direction
|
|
What is the difference between input text and dynamic text?
|
dynamic- can be modified during runtime (a game score)
input- supplied by user & not with code |
|
How do you change the text within a text field using code?
|
myTextField.text = "some text";
|
|
What event needs to be registered to check if a key has been pressed?
|
KEY_DOWN
ex: stage.addEventListener(KeyboardEvent.KEY_DOWN, kDown); |
|
How do you find a keycode?
|
trace(e.keyCode ==37) {
trace("Left"); } |
|
How do you code a movie clip to move left and right based off the user hitting the left and right arrow keys?
|
after function....
if(e.keycode == 37) { box_mc.x -= 5; } |
|
When should you render a text field?
|
every time you update
|
|
How do you create a populated array?
|
var testScores:Array = [90,80,100]
|
|
What is the index number of the firs element in the array?
|
zero
|
|
What functions removes the last element from an array?
|
pop(), splice()
|
|
How do you insert element in an array?
|
box.splice(1,0,"bob");
|
|
What property gives you the total number of elements in an array?
|
Length Property
|
|
In the array myGrades, how would you change the third element to 95?
|
var myGrade:Array = [90,1]
myGrade [1]=95 |