Title.
Develop games in your browser. Powerful, performant & highly capable.
Set a global variable to the layout number when a player goes to it...
System.LayoutName gets the current layout's name.
https://www.scirra.com/manual/126/system-expressions
My example was assuming you were viewing a different layout than your player was currently on.. as in a "store" or "menu" layout.