Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------------------------------------------------------------
- --
- -- main.lua
- --
- -----------------------------------------------------------------------------------------
- Red_Button = display.newImage("Red_Button_Up.png")
- Red_Button.x = display.pixelWidth / 3
- Red_Button.y = display.pixelHeight / 3.5
- Red_Button_B = display.newImage("Red_Button_Down.png")
- Red_Button_B.x = display.pixelWidth / 3
- Red_Button_B.y = display.pixelHeight / 3.5
- Red_Button_B.isVisible = false
- Text = display.newImage("Do_Not_Press.png")
- Text.x = display.pixelWidth / 3
- Text.y = display.pixelHeight / 10
- whitelevel = 0
- whitesize = display.pixelHeight
- whiterect = display.newRect(display.pixelWidth / 3,display.pixelHeight / 3.5,0,0)
- whiterect.isVisible = false
- whiterect.alpha = whitelevel
- display.setStatusBar(display.HiddenStatusBar)
- function main()
- Red_Button.isVisible = false
- Red_Button_B.isVisible = true
- timer.performWithDelay(500, whiteflash)
- end
- function whiteflash()
- whiterect.isVisible = true
- whiterect.width = whitesize
- whiterect.height = whitesize
- transition.to(Text, {time=300, delay=1000, alpha=0})
- transition.to(Red_Button_B, {time=300, delay=1000, alpha=0})
- transition.to(whiterect, {time=500, delay=1000, alpha=1})
- timer.performWithDelay(200, close)
- end
- function close()
- native.requestExit()
- end
- Red_Button:addEventListener("touch", main)
Advertisement
Add Comment
Please, Sign In to add comment