When I visited Marvel Entertainment's (NYSE:MVL) high-rise, though modestly appointed, headquarters in New York earlier this month, the walls were what struck me the most. They were covered in bright character renditions as well as current and classic editions of comics I remember collecting as a youth.

And it made me nervous. After all, this is a company that, in days past, I might have given a limb to write for. But now, as a Fool, it was my job to study the mechanics of the business itself. So that's what I did. What you have before you is the result -- part one of a two-part miniseries exploring the primary elements of Marvel's business, beginning with movies and licensing.

What does it take to make one of Mighty Marvel's magnificent flicks? Read on, dear Fool.

Action!
As complex as Marvel's film financing deal is, the process of creating a hit like Ghost Rider, which is setting box office records now, begins normally enough. The first step is to hire a screenwriter.

For licensed properties -- such as the blockbuster Spider-Man franchise, which has been produced in concert with Sony's (NYSE:SNE) Columbia Pictures, or the Fantastic Four films, which are being made by News Corp's (NYSE:NWS) 20th Century Fox -- Marvel has partnered with studio executives to shepherd the process.

With self-produced films such as 2008's Iron Man, Marvel has total creative control and pays all production costs until the terms set forth by its investors are satisfied. Principally, that means securing a completion bond, which guarantees some form of reimbursement to investors if a financed film fails to be completed.

There are several steps to securing a completion bond. According to Marvel's most recent annual report, the list includes:

1. Approved production, cash flow, and delivery schedules.
2. An approved budget.
3. An approved script.
4. Hiring key members of the production crew, including the director and producer.

That's why John Turitzin, a Marvel executive vice president who also is a key member of the office of the chief executive, told me in an interview, "Iron Man is the entire life for our people in Hollywood right now." (Iron Man, starring Gwyneth Paltrow and Robert Downey Jr. and directed by Jon Favreau, is to begin filming on March 12th.)

What investors should know is how this process impacts Marvel's earnings and cash flow. For that, allow me to refer you to the fourth-quarter and full-year earnings reports made yesterday. Take a look at the cash flow statement in the press release. Under "changes in operating assets and liabilities," you'll find $15.1 million spent for film production. That's essentially what has been spent to get Iron Man under way.

Turitzin says that when filming begins, Marvel should be able to draw from the facility in order to reimburse itself for out-of-pocket costs. From there on, vice president Matt Finick, who also sat in on the interview, says that Marvel should be able to pull funds as production costs come due -- almost like a credit card.

Paying for the camera
That's a pretty good deal. But it also means that, now more than ever, investors need to cuddle up with Marvel's cash flows. Not that earnings aren't important -- they are. But Marvel won't be able to keep producing movies if cash flow suffers.

Fortunately, that's not the case. For 2006, I estimate that the comic book king produced $61.7 million in owner earnings -- more than enough to cover the up-front cost of Iron Man. And that's in a down year when licensing was hurt by a thin movie slate.

With Ghost Rider, Spider-Man 3, and Fantastic Four 2: Rise of the Silver Surfer -- which, by the way, looks fun -- scheduled for 2007, Marvel should earn at least $66 million in owner earnings (OE), so long as it maintains the same OE margin that it had last year. And that, in turn, should be more than enough to start production of The Incredible Hulk while handling other operating needs.

But I expect even better results. Marvel's offices are anything but decadent. And the office motto -- "less meetings, more productivity" -- was displayed prominently above the drawing board in the tiny conference room where I interviewed Turitzin and Finick. All signs point to a firm that's being cautious with its cash.

Meanwhile, Marvel is using other means to buoy margins and cash flow to reduce its risk in making feature films. Two of the more prominent deals involve Hasbro (NYSE:HAS), which Finick says handles most operating costs in toy licensing, and Lions Gate (NYSE:LGF), which cuts costs in direct-to-DVD animated productions and includes a profit-sharing component.

Out on a cliffhanger
If there's a problem, it's in what Marvel can, and can't, produce on its own. Turitzin says most of the company's licensing deals go back many years, when the company needed money to exit bankruptcy. Consequently, it gave some studios very generous terms.

How generous? Some studios retain rights to entire families of characters. Fox, for example, has the rights to the X-Men family. That means if Marvel wants to make a film featuring one of its more obscure mutants -- perhaps the winged Angel or metallic muscleman Colossus -- it has to do the deal with Fox.

The same goes for Spidey. Just about any character deemed to be a part of the Spider-Man universe is a Sony property for the purposes of filmmaking.

But how bad is this really? Marvel has more than 4,000 characters, and some of its most high-profile -- including the superhero team The Avengers, of which Captain America, Iron Man, The Hulk, and Thor have all been a part -- are strictly owned by Marvel.

What's more, there's a newfound synergy between those making movies and those who make the characters. More on that pulse-pounding story in tomorrow's follow-up, which includes my interview with Marvel editor-in-chief Joe Quesada. Excelsior!

Marvel and Hasbro are both Stock Advisor picks. Click here to get access to get 30 days of free access to the entire portfolio, which is beating the market by more than 41%.

Fool contributor Tim Beyers, who is ranked 1,275 out of more than 23,400 in our Motley Fool CAPS investor-intelligence database, enjoyed his visit to Marvel about as much as any interview he's ever done. Tim didn't own stock in any of the companies mentioned in this story at the time of publication. All of his portfolio holdings can be found at Tim's Fool profile, and his thoughts on superhero movies, Foolishness, and investing in general may be found in his blog. The Motley Fool's disclosure policy is a hero to your portfolio.