How can I create a preloader for a file with document class

I’m working on an AS3 project, now the main file has a document class.
How can I create a preloader for this file?

I tried to do in the document class, but since I declare global variables (which start different class) there, the loading only starts after they are loaded.

Isn’t there an easy solution like in AS2?
Where you’d just put a scene of “Loading” as your first scene which loads your file from start to end no matter which size or what it’s loading?