# Subclassing from SWFs

**URL:** https://forum.kirupa.com/t/subclassing-from-swfs/248906
**Category:** flash
**Created:** [January 13, 2008, 6:11am UTC](https://forum.kirupa.com/t/subclassing-from-swfs/248906 "2008-01-13T06:11:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Rezmason](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rezmason/32/30447_2.png) [@Rezmason](https://forum.kirupa.com/u/Rezmason)
#### Post date: [January 13, 2008, 6:11am UTC](https://forum.kirupa.com/t/subclassing-from-swfs/248906/1 "2008-01-13T06:11:59Z")

</div>

I have a game platform in the works called Engram, which accepts special game modules, and to add a new module to the platform, you would compile a simple class like so:

```auto
package {
	import net.rezmason.engram.Bedrock;
	import net.rezmason.engram.modules.tetris.Tetris;
	
	[SWF(width='800', height='600', backgroundColor='#444444', frameRate='60')]
	public final class Jeretris extends Bedrock {
		public function Jeretris():void {
			super([new Tetris]);
		}
	}
}

```

I plan to allow other Flash programmers to make new modules compatible with engram, and submit them to a sort of developer community. The easy way to make this possible would be to open source the project, and to field module submissions to make sure they’re acceptable.

But the project’s source is pretty large and intimidating. It’s something like forty classes and two FLA’s right now. I’d much rather compile them into SWFs, and use the [Embed] metatag like so:

```auto
package {
	[SWF(width='800', height='600', backgroundColor='#444444', frameRate='60')]
    [Embed('./firmament.swf', symbol='Bedrock')]
	public final class Jeretris2 extends Bedrock {
		
		[Embed('./tetris.swf', symbol='Tetris')]
		private var Tetris:Class;
		
		public function Jeretris2():void {
			super([new Tetris]);
		}
	}
}

```

Except that it doesn’t work. Basically, my ‘Bedrock’ and ‘Tetris’ classes are not symbols in the SWF libraries, but are actual classes. Is there any way to extend a class in a SWF that is _not_ a library symbol?
