# How do I make a as3 self preloader in flash cs5

**URL:** https://forum.kirupa.com/t/how-do-i-make-a-as3-self-preloader-in-flash-cs5/313472
**Category:** Uncategorized
**Created:** [August 31, 2010, 4:16pm UTC](https://forum.kirupa.com/t/how-do-i-make-a-as3-self-preloader-in-flash-cs5/313472 "2010-08-31T16:16:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![user\_name1](https://avatars.discourse-cdn.com/v4/letter/u/e8c25b/32.png) [@user\_name1](https://forum.kirupa.com/u/user_name1)
#### Post date: [August 31, 2010, 4:16pm UTC](https://forum.kirupa.com/t/how-do-i-make-a-as3-self-preloader-in-flash-cs5/313472/1 "2010-08-31T16:16:57Z")

</div>

How do I set up a self preloader in flash cs5 using as3?

It seems to ignore [Frame(factoryClass=“com.path.to.Preloader”)]

and I when I try to use a technique like this [http://www.gamepoetry.com/blog/2008/10/05/the-last-preloader-youll-ever-need-really/](http://www.gamepoetry.com/blog/2008/10/05/the-last-preloader-youll-ever-need-really/) I get an error

```auto

ReferenceError: Error #1065: Variable VARIABLENAME is not defined.
at global/flash.utils::getDefinitionByName()

```

unless I reference the variable inside the preloader code which defeats the purpose of having a preloader at all.

What am I doing wrong?

Setting the flash file to export classes on frame 2 doesn’t seem to work either because it puts my preloader class on frame 2. Is it possible to specify that the preloader goes on frame 1 and the rest of the classes go on frame 2?

Thanks
