Well toss in a boolean function, and an if statement on ALL code, so
Code:
if(_root.KillCode == false){
//Rest of your code
}
so if this boolean = true, then none of the code will execute. Then make a timer (just google how to make a flash timer) and set the timer to when you want the .swf to stop working, then in the code put
Code:
if(_root.TimeLeft <= 1){
_root.KillCode = true
}
so 1 milisecond before the time you want the .swf to stop working, the boolean will switch to true and none of the code will work