Hi! Like many people, I started learning Korona from the popular lesson “Corona SDK App Creation: Part 1” on youTube (It describes how to create a simple application about recipes of pasta)
In the final scene, we have:
*Image and recipe pasta (.png), which supports scrollView
*Semi-transparent topBar at the top of the screen.
*BackButton over this TopBar.
I strictly followed the lesson, and has made only thematic changes and used Iphone4 view (author used another phone).
Everything works. And BackButton works too. But if the image(using scrollView) is situated under the BackButton, then click on the button is useless - you simply drag the image.
However, the author of the lesson use the same code and it works.
What could be wrong? I shuffled all the possible options. Even so place the picture over the BackButton and under the BackButton. Nothing helps. For a hour I was watching the code carefully, studied every line. Korona Simulator Output looks happy and say nothing (except “movemovemovemovemove…end” when i’m draging the picture =)
Here is the code of Lua file about me. (I changed recipes and dishes, to the members of my family. This is so cute, don’t you?))
[code]module (…, package.seeall)
function new ()
local familyGroup = display.newGroup ()
local scrollView = require (“scrollView”)
local util = require (“util”)
local topBoundary = display.screenOriginY
local bottomBoundary = display.screenOriginY
local scrollView = scrollView.new {top = topBoundary, bottom = bottomBoundary}
local anton = display.newImage (“graphics / anton.png”)
local topbar = display.newImage (“graphics / topbar.png”)
local back = display.newImage (“graphics / back_button.png”)
back.x = 50
back.y = 95
back.scene = “menu”
back: addEventListener (“touch”, changeScene)
scrollView: insert (anton)
familyGroup: insert (scrollView)
familyGroup: insert (topbar)
familyGroup: insert (back)[/code]
Thank you for your advices.
PS:
To freeze strictly the picture below the button - is not the solution.
PSS: Its for to help your imagination
[import]uid: 120280 topic_id: 21060 reply_id: 321060[/import]
