How to store variables?

So i think i’m pretty close. Basically I’m trying to store instance names of the currentTarget in a variable by using the instance name of an object that is on the stage. I know how to do it with as2, but I’m having trouble translating to as3. I’m using an “if statement” so if the variable is null it does one thing, then if the variable has the instance name then it does the if statement for the object of the instance name that it is holding, then the instance name is supposed to be taken over by the new button that was just pressed. I’ll zip up the fla file, hopefully this will make more sense.