Basica Flashcards
How do you load audio?
–Preload audio
Local soundName = audio.loadsound(“sound file “)
How to make images a variable
Local variableName = display.newImage(“fileName”)
How to display image in the center
ImageName.x = centerX ImageName.Y = centerY
How do you display a new image
Display.newImage(“fileName”)
How to change position on screen
transition.to(background, { time= 2000, y=centerY, x=centerX})
How to transition opacity
transition.to(ImageName, {alpha=1})
How to transition to scale
transition.to( ImageName, { xScale= 2, yScale= 2 })
How to change image size
Image.xScale=
image.yScale=
How to start image off screen
ImageName.y = display.contentHeight + 60
How to change image opacity
ImageName.alpha = 2
OnComplete does what?
Once something happens this cause something else to happen. It’s like an if statement.
Add text
Local text = display.text(“ your text” x axis, y axis, font type, font size)
Change text opacity
Text.alpha = .5
Rotate text
Text.rotation=
Set text color
Text:setTextColor(R,G,B)