may be a break in the HT lead this happened to me a while ago turned out the wire in the end off the coil had corroded so i cut it back abit then it was fine. like you said could be a loose wire if it's sparking some times then not sparking. could be a number off things i would start with the wiring first then check timing points. could also be a faulty plug. there are some dodgy plugs about claiming there genuine and there not. so could be that. hope this helps.