Global functions through different scenes (director)

Hi,

I am trying to have a part of my app stick when I change scenes.

The part I want to stick is in a seperate file called template.lua and the function is smalltitle()

When I want to call this I literally put template.smalltitle() in to my scene and it pops up in the position I want, however when I change scene I have to recall this function.

I wish to have a main menu page which doesn’t show this, but then when you go on to the next page i want this template.smalltitle() function to show and stick so I dont have to recall it on subsequent pages, until I go back to the main menu where it will again disapeer.

I know it has something to do with .isVisible() but I can’t seem to get it working, can anyone help?

Thanks [import]uid: 72726 topic_id: 13948 reply_id: 313948[/import]

I thought that Director destroyed everything in the main display group returned by the “new” function that Director calls for each scene? In that case, and if your “smalltitle()” function is using that group, I presume you wouldn’t be able to preserve it.

You could try adding the display object to a display group outside of the one(s) used by Director to create this “sticking” effect. [import]uid: 26769 topic_id: 13948 reply_id: 51312[/import]