Best usage for a basic button class?

Hi,

I’ve created a basic button class called BasicButton, the purpose of which is to allow me to create an mc in the library with various states for the button and then just add the button class to the class path in the mc properties to get it behaving like a button.

This all works fine except for when I want two different types of buttons, so if I have two mc’s in the library both using my button class as their class. I get the following error:


**Warning** The linkage identifier 'com.company.ui.buttons.BasicButton' was already assigned to the symbol 'Components/BasicButton', and cannot be assigned to the symbol 'FullScreenButton', since linkage identifiers must be unique.

Is the only way to get around this to create a separate class for the new FullScreenButton mc and get that to extend BasicButton? Or am I going about this totally the wrong way?

Thanks,

eb_dev

BasicButton


package com.company.ui.buttons
{
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.MouseEvent;

	public class BasicButton extends MovieClip
	{
		public function BasicButton()
		{
			// Stop play
			stop();
			
			// Make button behave like a button
			this.buttonMode = true;
			
			// Show hand cursor on mouse over
  			this.useHandCursor = true;
			
			// Add mouse over event listener
			addEventListener(MouseEvent.MOUSE_OVER,onMouseOver);
			
			// Add mouse out event listener
			addEventListener(MouseEvent.MOUSE_OUT,onMouseOut);

			// Add mouse down event listener
			addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
			
		}
		public function onMouseOver(evt:MouseEvent)
		{
			gotoAndStop(2);
		}
		public function onMouseOut(evt:MouseEvent)
		{
			gotoAndStop(1);
		}		
		public function onMouseDown(evt:MouseEvent)
		{
			gotoAndStop(3);
		}				
	}
}