displayGroup always on top of director class

I am trying to have a displayGroup on top of everything displayed by the Director class, including popups. I would also like to pass certain objects from the various scenes held together by Director into yet another displayGroup above this displayGroup (that is already ontop of everything else…) so they sit on top of everything but when the scene transitions these objects transition with the scene, but the other original displayGroup on top of everything does not.

Complicated I know!

How I would imagine it working is to have a displayGroup inside of the director.lua file that I can pass objects into from other lua files, but this doesn’t seem possible after testing. I cant add objects to displayGroups inside other lua files.

I have managed to get a displayGroup on top of everything except pop ups by adding it to main.lua after the main() command but I cant pass objects from other scenes into this, or ontop of this… this would be ideal if I could and solve my issues.

Or if there is a parameter allowing an object to be added to the scene that director transitions but not allow it to transition along with the other objects, that would also solve my problem I think. [import]uid: 69160 topic_id: 14081 reply_id: 314081[/import]

just try this and see how it works.
if u want to add display objects from other lua files with out making it a part of director, don’t insert it into the local group returned as part of director. this will make those display object on top of object from other screens.
sample

main.lua
[lua]local director = require (“director”)
local mainGroup = display.newGroup()

local function main()
mainGroup:insert(director.directorView)

director:changeScene(“screen1”)
return true
end

main()[/lua]
screen1.lua
[lua]module(…, package.seeall)

function new()
local localGroup = display.newGroup()
local Group1 = display.newGroup()
local nextBTN = display.newText( “Next”, 270, 430, nil, 12 )
localGroup:insert(nextBTN)
local function nextScr (event)
director:changeScene (“screen2”)
end

nextBTN:addEventListener (“tap”, nextScr)
local msg = display.newText( “screen 1”, 100, 50, nil, 12 )
localGroup:insert(msg)

local circle = display.newCircle(100,280,40)
circle:setFillColor(255,0,0)
Group1:insert(circle)

return localGroup

end[/lua]
screen2.lua
[lua]module(…, package.seeall)
local ui = require(“ui”)
function new()
local localGroup = display.newGroup()

msg = display.newText( “on screen 2”, 100, 100, nil, 12 )
localGroup:insert(msg)

local circle2 = display.newCircle(150,280,40)
circle2:setFillColor(255,255,0)
localGroup:insert(circle2)
return localGroup

end[/lua] [import]uid: 71210 topic_id: 14081 reply_id: 51867[/import]