# Extend classes / split up \[AS2\]

**URL:** <https://forum.kirupa.com/t/extend-classes-split-up-as2/76407>\
**Category:** Uncategorized\
**Created:** [January 18, 2005, 10:29am UTC](https://forum.kirupa.com/t/extend-classes-split-up-as2/76407 "2005-01-18T10:29:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roady](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@roady](https://forum.kirupa.com/u/roady)\
**Post date:** [January 18, 2005, 10:29am UTC](https://forum.kirupa.com/t/extend-classes-split-up-as2/76407/1 "2005-01-18T10:29:59Z")

</div>

Hi everyone.  
I’m trying to learn to extend/split up my classes. For example say that I have a preloader, I want to load different things different ways so that’s why I have several loading functions.

What I want is to have the base preloader that holds functions that all preloader functions can use. Then I want all the different loaders functions in different classes.

Preloader.as

- Preloader\_preloadIntroElements.as
- Preloader\_loadSwfs.as
- Preloader\_preloadMovies.as

How schould I solve this?  
I started a little like this:  
[COLOR=Red]Preloader.as[/COLOR]

```auto
import com.broadcaster.EventBroadcaster
class com.loaders.Preloader extends EventBroadcaster{
    function Preloader(){
        //some things
    }

    function preloadIntroElements(){}
}

```

and then in the [COLOR=Red]Preloader\_preloadIntroElements.as[/COLOR]

```auto
import com.loaders.Preloader
class com.loaders.Preloader_preloadIntroElements extends com.loaders.Preloader{
    function preloadIntroElements(alot of values){
        // Do all loading stuff
    }
}

```

**The problem is that I cant get to the Preloader\_preloadIntroElements.as class. it stays and just runs the preloadIntroElements function in Preloader.as**
