# Simple class not working

**URL:** https://forum.kirupa.com/t/simple-class-not-working/275049
**Category:** flash
**Created:** [November 8, 2008, 11:12am UTC](https://forum.kirupa.com/t/simple-class-not-working/275049 "2008-11-08T11:12:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![obmon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/obmon/32/3503_2.png) [@obmon](https://forum.kirupa.com/u/obmon)
#### Post date: [November 8, 2008, 11:12am UTC](https://forum.kirupa.com/t/simple-class-not-working/275049/1 "2008-11-08T11:12:41Z")

</div>

Thanks in advance for any help…

in my root web directory i have a folder called “script” which has a file called “LoadSubStage.as”  
it contains:

```php

// Load script.SubStage Class
class LoadSubStage {

    // Selection Constructor
    public function LoadSubStage (activeStage:String) {
        LSubStage (activeStage);
    }
    
    // Constructor Function to Load Appropriate SubStage   
    private function LSubStage (activeStage) {
       var MC_emptyHolder:MovieClip = _root.createEmptyMovieClip ("MC_emptyHolder", 100);
       MC_emptyHolder._x = 100;
       MC_emptyHolder._y = 100;
       MC_emptyHolder.loadMovie(activeStage);
    }
}

```

in my .fla i have the following code (the first part for liquid layout, the second for loading the sub swf movie):

```php

// Stage Setup
Stage.align = "TC";
Stage.scaleMode = "noScale";

// Liquid Layout
var headerBackground_xPosition = Stage.width/2;
var headerBackground_width = Stage.width*2
_root.attachMovie("MC_headerBackground", "MC_headerBackground", this.getNextHighestDepth(), {_x: headerBackground_xPosition, _y: -150, _width: headerBackground_width});

// Layout Correction for Liquid Layout
sizeListener = new Object();
sizeListener.onResize = function() {
    if (Stage.width < 800) {
        MC_headerBackground._x = 400;
        MC_headerBackground._width = 800;
    } else {
        MC_headerBackground._x = Stage.width/2;
        MC_headerBackground._width = Stage.width * 2;
    }
};
Stage.addListener(sizeListener);

// SubStage Selection & Load
import script.*;
var LStage:LoadSubStage = new LoadSubStage();
LStage.LoadSubStage("intro_movie.swf");

//
stop ();

```

There will be a lot more to the code, but for some reason I can’t get past this part. I get the following error:

```php

**Error** Scene=Scene 1, layer=Script, frame=1:Line 25: The class or interface 'LoadSubStage' could not be loaded.
     var LStage:LoadSubStage = new LoadSubStage();

Total ActionScript Errors: 1 Reported Errors: 1

```

I can’t see whats wrong. Can you?
