How to determine Z-Order for 3D objects?

I have constructed a 3D model in Flash CS4/AS3 consisting of a space containing numerous block Display objects.  For each block, I maintain an array of Vector3D vertices.  I rotate a camera viewpoint around the constructed 3D model.

My question:  Given the current camera viewpoint, how do I determine the correct order for my block DisplayObjects?  

By calculating the average distance from the camera to a block's vertices, I can determine the correct order but only when all blocks are of the same dimensions and positions symmetrically about the space.  However, this approach is too crude for the space that I need to represent.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I looked online and found these flash articles that may help:
Haven't worked in flash - but I hope the info helps.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
This might be worth a read:

I was trying to do this some time ago, and basically you have to plump for sorting on the distance or use a 'proper' 3D engine.

Sorry! :\
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.