Identifying Current Stack (Solved)
Posted: Mon Aug 12, 2019 2:42 pm
I feel so stupid asking this, but the documentation is a little light and I can't seem to get the right words...
I have an app with multiple stacks.
I have a script that appears in an object that gets cloned to all stacks. In that script, I want certain sections to work only on certain stacks, and not others. So, I need to identify "the current stack" somehow. 'the topStack' seems to be the function I need, but I can't get it to work.
Here's a sample script:
So, when the mouse is clicked in stack "Image", and the current action is "Grid", it should do all the things in the statement --do grid things--. When the mouse is clicked in stack "ColourPicker" nothing should happen because it's the wrong stack for that action.
But that doesn't seem to work.
How do I work out what the name of the stack is where the mouse is clicking?
Thanks in Advance
X
I have an app with multiple stacks.
I have a script that appears in an object that gets cloned to all stacks. In that script, I want certain sections to work only on certain stacks, and not others. So, I need to identify "the current stack" somehow. 'the topStack' seems to be the function I need, but I can't get it to work.
Here's a sample script:
Code: Select all
on mousedown
if the topstack is "Image" then
if gCurrentAction = "Grid" then
--do grid things--
end if
end if
But that doesn't seem to work.
How do I work out what the name of the stack is where the mouse is clicking?
Thanks in Advance
X