hello everyone!

ok so im working on a flash game right and im having a problem with a bit of scripting, does anyone know how to make it to where if i have, say a key in frame 2 and i click on it it goes to my inventory in frame 2 and then if i leave to go to like frame 3 and i have to come back to frame 2 to get to another section of the house or something the key still appears their in frame 2, and im a little tired of it and i DESPERATLY need help, with this, so if you or anyone you know may be able to help me i would very much apreciate it, and even give you guys credit at the end of my game i swear i will

anyways a script im looking for is one that stops objects from appearing over and over again when i cross a certain frame like frame 2 for example.

if anyone needs me to explain it again post a reply and i'll see if i can clarify, (sorry for the long explenation) anyways thank you all! have a wonderful day!