# Preload MC created at runtime

**URL:** https://forum.kirupa.com/t/preload-mc-created-at-runtime/267793
**Category:** flash
**Created:** [August 5, 2008, 7:14pm UTC](https://forum.kirupa.com/t/preload-mc-created-at-runtime/267793 "2008-08-05T19:14:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![espenc](https://avatars.discourse-cdn.com/v4/letter/e/b2d939/32.png) [@espenc](https://forum.kirupa.com/u/espenc)
#### Post date: [August 5, 2008, 7:14pm UTC](https://forum.kirupa.com/t/preload-mc-created-at-runtime/267793/1 "2008-08-05T19:14:36Z")

</div>

Hi,

I am working on a site and I am new to AS3, but I am starting to get a grip of it. I have a class Page.as. This class creates a background and loads xml from a drupal module and loads the xml data into textfields and so on. This works great and uses no external assets, all is created on the fly.

I initiate a page by doing so…

```auto
var frontpage:Page = new Page("home");
this.addChild(frontpage)

```

The thing I want to do is make a preloader for the page loading, cause everytime i load a new page there is some loading time because of the xml loading and loading of pictures inside and so on…

How can I listen to the loading progress of the Page class? If i can get the loading information I now how to make the preloader, but how do I collect loading data? I know how to do it with external assets (swfs) and so on, but how to do it like this?

Sincerly Espen
