# Illegal override error question (importing swf subclass)

**URL:** <https://forum.kirupa.com/t/illegal-override-error-question-importing-swf-subclass/243894>\
**Category:** Uncategorized\
**Created:** [November 12, 2007, 12:23pm UTC](https://forum.kirupa.com/t/illegal-override-error-question-importing-swf-subclass/243894 "2007-11-12T12:23:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pleeschultz](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@pleeschultz](https://forum.kirupa.com/u/pleeschultz)\
**Post date:** [November 12, 2007, 12:23pm UTC](https://forum.kirupa.com/t/illegal-override-error-question-importing-swf-subclass/243894/1 "2007-11-12T12:23:50Z")

</div>

So… Here’s the problem. I need just a bit of help figuring out why I’m getting an illegal override error. I’m sure it has to do with the fact that I’m importing an external swf that is a subclass of the importer swf, but I’m not sure how to proceed.

4 files involved - Shell.as, Shell.fla, Page.as, Page.fla

the error is:  
VerifyError: Error #1053: Illegal override of frame1 in xxx.Page.  
ReferenceError: Error #1065: Variable Page is not defined.

(xxx being the package name I don’t want known)

This error only occurs when running the Shell.fla. If I run Page.fla, I can click the hitMe moviclip and Peter counts up… (name is peter 😉 So here it is…

Shell.as:  
//////////

package xxx {  
import flash.display._;  
import flash.events._;  
import [flash.net](http://flash.net).\*;

```
public class Shell extends MovieClip{
	private var peter:String = "Peter";
	private var peterCalls:int = 0;
	
	public function Shell() {
		//trace(this.peter);
	}
	
	internal function tracePeter() {
		this.peterCalls++;
		trace(this.peter + this.peterCalls);
	}
}

```

}

First frame of Shell.fla:  
/////////////////////////

var swfLoader:Loader = new Loader();  
var swfURL:URLRequest = new URLRequest(“Page.swf”);  
swfLoader.load(swfURL);  
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded);  
this.addChild(swfLoader);

function swfLoaded(e:Event):void{   
trace(trace(“Page Loaded”));  
}

Page.as:  
////////////

package xxx {  
import flash.display._;  
import flash.events._;

```
public class Page extends Shell{
	
	public function Page() {
		trace("opened Page");
	}
	
	internal function traceShellPeter() {
		tracePeter();
	}
}

```

}

First frame of Page.fla:  
/////////////////////// - just a simple movieclip on first frame w/instance name hitMe

hitMe.addEventListener(MouseEvent.MOUSE\_DOWN,hitMeClick);

function hitMeClick(e:Event):void{  
traceShellPeter();  
}

So, am I allowed to do this? My goal here is to create a way to import multiple swfs onto the Shell stage and are all Page objects. Then I want these Page objects to be able to use the Shell’s methods and variables… Any help appreciated, thanks
