A stack player may be useful distributing your stacks to those who don't want to install the LiveCode program, or to help convince them installing and learning to code with LiveCode might actually be fun.
Save changes to the stack being played with a closeStackRequest handler placed in its stack script.
on closeStackRequest --in stack script, File > Close, red "X" / close dot
answer "Save changes?" with "Cancel" or "OK" titled "Save Changes"
if it = "OK" then save this stack as (the effective fileName of this stack) --save changes
pass closeStackRequest --allow user to close/quit
end closeStackRequest
Here's an example of a stack that becomes a Stack Player when made into a desktop standalone. Instructions included.
Below are more example stacks on my web page. Terry
Save Changes Using Stack Player
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Save Changes Using Stack Player
Beginner Lab (LiveCode tutorial) and StarterKit (my public stacks)
https://tlittle72.neocities.org/openxtalk.html
https://tlittle72.neocities.org/openxtalk.html