Trying to refresh screen with director.lua

Hi.
I have a screen called refresh.lua with this inside:

[lua]
module(…, package.seeall)

function new()
local director = require(“director”);
local localGroup = display.newGroup();

director:changeScene(“menu”);

return localGroup;
end

[/lua]

And another called menu.lua, where I call director library to change the screen to refresh.lua:

[lua]
module(…, package.seeall)

function new()
local director = require “director”;
local localGroup = display.newGroup();

local button = display.newRect(0, 0, 50, 50);
button.x, button.y = 480/2, 320/2;
localGroup:insert(button);

local function refreshScreen(e)
if(e.phase == “ended”)then
button:removeEventListener(“touch”, refreshScreen);
localGroup:removeSelf();
director:changeScene(“refresh”);
end
end
button:addEventListener(“touch”, refreshScreen);

return localGroup;
end
[/lua]

I guess refresh.lua should bring me back to menu.lua, but why is this not happening?

Thanks. [import]uid: 162818 topic_id: 37071 reply_id: 67071[/import]

Up… [import]uid: 162818 topic_id: 37071 reply_id: 145402[/import]

Solved. [import]uid: 162818 topic_id: 37071 reply_id: 145465[/import]

Up… [import]uid: 162818 topic_id: 37071 reply_id: 145402[/import]

Solved. [import]uid: 162818 topic_id: 37071 reply_id: 145465[/import]