# AS3 preloader inside .as file

**URL:** <https://forum.kirupa.com/t/as3-preloader-inside-as-file/273011>\
**Category:** flash\
**Created:** [October 10, 2008, 7:22am UTC](https://forum.kirupa.com/t/as3-preloader-inside-as-file/273011 "2008-10-10T07:22:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jenna\_Launch](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@Jenna\_Launch](https://forum.kirupa.com/u/Jenna_Launch)\
**Post date:** [October 10, 2008, 7:22am UTC](https://forum.kirupa.com/t/as3-preloader-inside-as-file/273011/1 "2008-10-10T07:22:57Z")

</div>

Hi there!

yet another preloader post i know!! i have tried so many tutorials and solutions but nothing seems to be working for me.

I am trying to put the preloader in my .as file because if i put a empty keyframe before everything on my timeline (and put in there) i get errors as my .as is trying to find objects that are not on the first frame stage (even when i set export classes frame2)

I have have posted an edited version of my .as file so you can get the drift of my structure.

any help would be much appreciated, even if it is re-structuring my functions!

thanks in advance 🙂
