Narrative:

Flight was cleared for takeoff with a turn to 010 degrees from 35R. I set my heading bug to 100 degrees after takeoff above 400 ft AGL. I made a right turn to 100 degrees. When steady on 100 degree heading and climbing through 7000 ft, departure called and asked 'who assigned your heading?' we replied 'tower.' departure answered, 'turn left, climb immediately to 8000 ft, you have traffic at 2 O'clock, 2 mi.' I turned and climbed immediately. Takeoff briefing was already accomplished when tower gave the new heading with the takeoff clearance. No one caught my mistake until departure called us for a traffic conflict. Recommend runway heading for a takeoff clearance and switching to departure sooner.

Google
 

Original NASA ASRS Text

Title: CAPT OF ACR LGT ACFT DEVIATED FROM ASSIGNED HDG DURING DEP CLB CAUSING LTSS WITH ANOTHER ACFT.

Narrative: FLT WAS CLRED FOR TKOF WITH A TURN TO 010 DEGS FROM 35R. I SET MY HDG BUG TO 100 DEGS AFTER TKOF ABOVE 400 FT AGL. I MADE A R TURN TO 100 DEGS. WHEN STEADY ON 100 DEG HDG AND CLBING THROUGH 7000 FT, DEP CALLED AND ASKED 'WHO ASSIGNED YOUR HDG?' WE REPLIED 'TWR.' DEP ANSWERED, 'TURN L, CLB IMMEDIATELY TO 8000 FT, YOU HAVE TFC AT 2 O'CLOCK, 2 MI.' I TURNED AND CLBED IMMEDIATELY. TKOF BRIEFING WAS ALREADY ACCOMPLISHED WHEN TWR GAVE THE NEW HDG WITH THE TKOF CLRNC. NO ONE CAUGHT MY MISTAKE UNTIL DEP CALLED US FOR A TFC CONFLICT. RECOMMEND RWY HDG FOR A TKOF CLRNC AND SWITCHING TO DEP SOONER.

Data retrieved from NASA's ASRS site as of July 2007 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.