spark question, can't remember fix

pulled the intake, bad gasket from previous owner. put it all back together. put new o-ring on distributor base, stupid hard to move and raises up when loosened. so i ended up touching the negative side of the coil with the dist. wrench 3 different times while running. it cut out the ignition while momentarily then kept running. got timing set. all's good and it just quits. doesn't start till it cools off. then runs till hot and quits again. when it's hot and not starting it fires(gets spark) when i turn off the key... trying to remember what that is a symptom of ??? changed the coil today, cranks but no spark, then backfires when turning off the key.
Did i fry the dam box ??! :oops: Any help is appreciated, thanks C300