Hi there,
Just having a play with Director 1.2 which looks really cool!
However, think I’ve discovered a bug. I’ve got a couple of screens one with a graphic (320 x 480) and another screen with a newRect (320 x 480) and a UI Button on the top with up and down images.
I’ve got a button:addEventListener with a director:changeScene(“game”,“crossfade”) to go to the screen with the graphic on it and then the graphic screen just has a runtime:addEventListene which switches back to the previous screen.
This works fine in 1.1 and also works fine in 1.2 as expected the two screen switch smoothly with the effect.
However in 1.2 on the button screen if you click OFF the button anywhere else on the screen and then click the button, the button stops operating. A refreshed of the simulator and all works again.
I switched director to 1.1 and this works fine, obviously without the crossfade effect.
Is this a bug or have I coded something wrong for the new 1.2?
[lua]local ui = require(“ui”)
local button = ui.newButton{
text = “Test Button”,
size = 12,
textColor = {0,0,0,255},
default = “up.png”,
over = “down.png”
}
button.x = 138
button.y = 275
button.isVisible = true
this:insert(button)
this.button = button
function loadGame(event)
if event.phase == “ended” then
director:changeScene(“cl”,“crossfade”)
end
end
this.button:addEventListener(“touch”, loadGame)[/lua] [import]uid: 33866 topic_id: 6649 reply_id: 306649[/import]