LAS VEGAS — Tom Hanks and Yahoo used the occasion of CES to throw a little party for themselves Tuesday night and offer a glimpse of their upcoming animated sci-fi web series, Electric City.

The show, which grew out of something Hanks once read about how the former Soviet Union controlled the flow of information to its citizens, is broadly about resistance fighters in a dystopian society, with no one — including the viewers — sure who they should trust.

In the three-minute teaser shown here at a reception during the Consumer Electronics Show, Electric City comes across as Aeon Flux as imagined by, well, Tom Hanks.

During an hourlong Q&A with Yahoo Executive VP Ross Levinsohn, Hanks explained how he came up with the idea for Electric City, his hopes for it, and why he chose to partner with Yahoo for the project. The show will air online in four- to six-minute episodes starting this spring.

The Hollywood star spoke of a love of “surprises” in storytelling and said that the commercial and creative constraints of movies and television wouldn’t allow him to tell the type of story he wanted to with Electric City.

“What we are trying to do here is make ambiguity attractive,” Hanks said in explaining why the story he wants to tell with the futuristic series wouldn’t work within the traditional Hollywood system. “And ambiguity is anathema in popular media right now. Try to tell a story loaded with irony or ambiguity or mixed signals — not that standard antagonist-protagonist — and you’re going to come to fisticuffs with the marketing and development people. They’re going to say, ‘Why does it have to be so hard to follow? Why can’t we have someone to root for?’ But in real life, you don’t know who to root for.”

Hanks said the team behind Electric City — Yahoo, Reliance Entertainment and Hanks’ own production company, Playtone — has already produced 90 minutes of the show for just $2.5 million. But he pointed out that the freewheeling online environment means there’s no reason the show must stop there, especially given the various elements he wants to explore.

“We can tell this story as long as we keep it alive and fresh,” he said. “We can’t exhaust this theme.”

Joining Hanks in voicing characters for Electric City will be Jeanne Tripplehorn, Chris Parnell and James Urbaniak.