Ben Affleck has admitted he did learn to count blackjack cards but said reports he was thrown out of casinos were untrue.

The Oscar-winning actor told US magazine Details he learned the technique so he could win at the game.

"That is a true story. I mean, that took place. I took some time to learn the game and became a decent blackjack player," he said.

"And once I became decent, the casinos asked me not to play blackjack. I mean, the fact that being good at the game is against the rules at the casinos should tell you something about casinos."

Card counting is where a player gains a slight advantage by keeping track of which cards have been dealt to predict the next hand.

The practice is not illegal but is heavily frowned upon by casinos.

Image:Ben Affleck stars in Gone Girl which is out next month

It was reported in May that security staff stopped Affleck during play at the Hard Rock Casino in Las Vegas, telling him "you are too good", according to a source close to the star.

"They don't even want you to have a sporting chance, really. There's a lot of hospitality, backslapping, when they think you're gonna come in and dump money, and if they think you might leave with some money, it's like, 'You know what? Why don't you try craps or roulette?'."

The Batman star said rumours he had been kicked out after counting cards were pure fiction though.

"I wish I could say they were afraid of me in every capacity, but they only said, 'No blackjack'.

"That would be awesome [if they threw me out]. 'Get him outta here! He's a magician!' Unfortunately, they just came up and said: 'We can't let you play blackjack. But we have other table games. We have Chinese poker'."

Affleck also denied there was any truth to reports his blackjack playing was affecting his marriage to actress Jennifer Garner.

Image:Affleck's Batman film is not due out until 2016. Pic: @zacksnyder

"What's Nick Dunne's mechanism? His mechanism is: 'I want you to like me, and I will use my charm to disarm any situation that starts to feel uncomfortable for me'. And you had to have an actor who understands what a slippery slope that is."

Fans can see Affleck as the Caped Crusader in Batman V Superman: Dawn Of Justice in 2016.