Hello! I’m new to Corona SDK and I was watching some tutorials from you on Youtube. In Gear Animation #3 - Backgrounds, buttons, and more I’m having some difficulties loading the UI library.
The Code:
[lua]-----------------------------------------------------------------------------------------
– main.lua
– Your code here
local ui = require(“ui”)
local background = display.newImage(“back.png”)
local gear = display.newImage(“gear.png”)
gear.xScale = 0.2
gear.yScale = 0.2
gear.x = display.stageWidth / 2 - 50
gear.y = display.stageHeight / 4
local gear2 = display.newImage(“gear.png”)
gear2.xScale = 0.2
gear2.yScale = 0.2
local q = 104
gear2.x = gear.x + q
gear2.y = gear.y + q + 1
local rotamount = 1
gear.rotation = 3
local function animate( event )
gear.rotation = gear.rotation + rotamount
gear2.rotation = gear2.rotation - rotamount
end
Runtime:addEventListener(“enterFrame”, animate)
local text = display.newText(“Rotation Gears”, 50, 380, nil, 24)
local text2 = display.newText(“It is fun!”, 70, 405, nil, 16)
text:setTextColor(255,255,255)
text2:setTextColor(255,255,255)
transition.to(text, {time = 3000, alpha = 0})
transition.to(text2, {time = 3000, alpha = 0})
local buttonHandler = function (event)
end
local stopbutton = ui.newButton{
default = “buttongray.png”,
over = “buttonover.png”,
onEvent = buttonHandler,
text = “Stop”,
id = “stop”,
size = 12,
emboss = true
}[/lua]
My console output:
http://img838.imageshack.us/img838/3367/outputff.png
Any way to solve this? Thanks! [import]uid: 208318 topic_id: 34723 reply_id: 334723[/import]