Basica Flashcards

1
Q

How do you load audio?

A

–Preload audio

Local soundName = audio.loadsound(“sound file “)

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

How to make images a variable

A

Local variableName = display.newImage(“fileName”)

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

How to display image in the center

A
ImageName.x = centerX 
ImageName.Y = centerY
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you display a new image

A

Display.newImage(“fileName”)

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

How to change position on screen

A

transition.to(background, { time= 2000, y=centerY, x=centerX})

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

How to transition opacity

A

transition.to(ImageName, {alpha=1})

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

How to transition to scale

A

transition.to( ImageName, { xScale= 2, yScale= 2 })

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

How to change image size

A

Image.xScale=

image.yScale=

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

How to start image off screen

A

ImageName.y = display.contentHeight + 60

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

How to change image opacity

A

ImageName.alpha = 2

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

OnComplete does what?

A

Once something happens this cause something else to happen. It’s like an if statement.

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

Add text

A

Local text = display.text(“ your text” x axis, y axis, font type, font size)

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

Change text opacity

A

Text.alpha = .5

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

Rotate text

A

Text.rotation=

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

Set text color

A

Text:setTextColor(R,G,B)

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

Have an item leave the screen

A

Display.remove(event.target)

Example text in attack of cuteness

Local function goAway(event)
Display.remove(event.target) 
Text= nil 
Display.remove 
spawnEnemy
17
Q

Display score

A

ScoreText = display.newText (“Score 0” , 0,0 “ font type, font size)

ScoreText.x = centerX
ScoreText.y = 10
Score = 0 ( will reset score to zero if you start a new game)
18
Q

How to play a sound

A

Audio.play(soundName)

19
Q

Return true

A

Find out

20
Q

Set up forward references

A

Used to reference items used later.lua needs to know what it’s using