# Load two different exerternal .as files?

**URL:** <https://forum.kirupa.com/t/load-two-different-exerternal-as-files/297764>\
**Category:** flash\
**Created:** [October 8, 2009, 5:10am UTC](https://forum.kirupa.com/t/load-two-different-exerternal-as-files/297764 "2009-10-08T05:10:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oluc](https://avatars.discourse-cdn.com/v4/letter/o/cc9497/32.png) [@oluc](https://forum.kirupa.com/u/oluc)\
**Post date:** [October 8, 2009, 5:10am UTC](https://forum.kirupa.com/t/load-two-different-exerternal-as-files/297764/1 "2009-10-08T05:10:25Z")

</div>

Thanks for looking at my post. 🙂

I have 2 AS files. One is my main Document Class which my fla accesses. The other I am trying to get to be a “sub as. file” that will load when the main one loads. (sorry I don’t have the nomenclature down… hopefully this all makes sense…)

The main Class loads pictures through xml. The subclass, (I guess it would be called), loads all of the elements that I need on the stage, such as the forward and back buttons etc.

My main class is

[AS]Public Class Slideshow extends Sprite {

//I then put a var within this with as the name of my subclass:

```
       public var stageElements:StageElements;[/AS]

```

(This was all just guess work because I was not sure what to search under to figure out how this is done the right way.)

Now, at first when I published the flash it gave me some errors that were in StageElements class so I fixed them and it loads all fine now without errors and the pictures come up but the stage elements do not.

I know that my StageElements class works because I have tried it out as the Document Class the .fla uses.

So, I am sure that I am missing something and maybe I am missing a lot. Can you point me in the right direction - or tell me what to read or what to search under please.

Thanks in advance!! And if you need more information from me please let me know!
