My solution to the never-ending shield:
If your shield gets activated, fades, and then turns back on again in an infinite loop, your program must be skipping your "_root.ship.shield._visible = false;" line for some reason. Check for possible typos. I typed mine accidentally as "sheld" instead of "shield." (Yes I don't copy-paste the codes because reasons).