The specifics of what you are after escape me, but you can have a variable that you use to keep track of which button gets clicked. Anytime a button gets clicked you have that button's code assign the desired value to that variable. That way you can use that variable when you get to whatever frame you intend to use that information.
What I usually do is have a couple of layers for actions. One that has variables and functions that are shared and one for frame-specific code (such as what you have shown so far). The first one would only have code in frame 1, but it will extend the full length of the timeline so that what is in it can be assigned/retrieved/used anywhere along the timeline.
how to assign variable then?
Just as an example using what you showed...
abt_btn.onRelease = function()
yourVariable = whatever;
end_btn.onRelease = function()
yourVariable = whatever_else;