 Rocks was elected as a Republican to the Pennsylvania House of Representatives for the 199th district and served from 1979 to 1982.He changed party affiliation to Democratic in 1982 and was elected to the Pennsylvania State Senate for the 4th district and served from 1983 to 1987.He switched party affiliation again to Republican and served in the Senate from 1988 to 1990.