Can i use old employer petition to transfer to new employer instead of current employer?

I got my H1B with Employer A then i transferred to Employer B. i entered to US with Employer B petition. Now Employer B project got over. If Employer B revoke the petition and Can I use employer A petition to transfer to new employer since Employer A petition is still valid up to Nov 2016.and they didn’t revoke the petition. Because Employer B if they fire me, they will revoke the petition immediately before I get the job from new employer.

Even if the petition is revoked, you can use A or B’s petition for H-1 transfer. Revocation will make it ineligible to be used by same employer, but a different employer can still use it as reference for cap-exempt filing.

Note that if they fire you, you get no grace period. You need to move to another employer and have them file H-1 transfer for you, ASAP.