Mark Cuban says he’s a follow-the-rules investor who checked with his broker to make sure that his 2004 sale of stock in an Internet company was legal.Cuban testified Thursday that he was upset when the CEO told him news that would reduce the value of his shares, for which he’d paid $7.5 million. But he said he did nothing improper when he sold those shares over the next two days.But the Securities and Exchange Commission is suing Cuban, alleging insider trading. Its lawyers painted him as a win-at-all-costs businessman who broke a promise of confidentiality and traded on private information that gave him an advantage over other investors. A jury in federal district court is hearing the lawsuit, which doesn’t involve criminal charges. Cuban clashed with SEC lawyer Jan Folena, who tried to use Cuban’s own words to undermine his defense that he had many reasons for selling his stake in Mamma.com, including possible associations with a convicted stock swindler. But Cuban didn’t mention those other reasons in emails and blogs that Folena produced. Mamma.com CEO Guy Faure testified that Cuban agreed to confidentiality at the outset of a critical phone call in which Faure detailed the offering. The CEO said Cuban became angry because he didn’t like such offerings and the promise of confidentiality meant that he would be prohibited from selling his shares until the offering was publicly announced. Asked about the call, Cuban acknowledged, “I was upset.” He said he couldn’t recall other details of the conversation but was certain that he never agreed to confidentiality or to refrain from trading on whatever he would hear. Cuban’s lawyer, Thomas Melsheimer, asked why he wouldn’t have accepted a no-trade clause. “Nobody’s going to tell me” when to trade, Cuban answered. He said he told a Mamma.com banker that he would sell his shares, “and that’s exactly what I did.” Folena charged that Cuban cheated because he couldn’t stand the idea of losing on an investment. “You look at every loss in your life as a huge failure,” she said to Cuban.“Absolutely not,” Cuban answered. Folena then quoted from a business article that Cuban wrote in which he said he took every loss as a huge failure. Cuban was Mamma.com’s biggest shareholder, with a 6 percent stake. The SEC says Cuban avoided $750,000 in losses by selling on insider information before the shares fell by nearly 10 percent once the private stock offering was announced. The SEC wants Cuban to give up that money and pay a fine.