I am running into a problem while trying to use inheritance
and linking my custom classes to movie clips in my library. I have
defined a custom class called "OptionTile" that extends the
flash.display.MovieClip class. This class is meant to represent a
basic option that a user can select in my movie. All the class does
is add event listeners for the mouse over and mouse out event and
displays a border around the option to indicate it is highlighted.
I then have some more advanced option tiles that change when
the user clicks on them, however they also need the highlighting
functionality that is defined in "OptionTile". So I thought this
could be achieved by creating specific classes for each of the more
advanced tiles and have these classes extend "OptionTile".
When it comes to the linkage dialogue box for my basic
options, I have set the base class to "OptionTile" and just let
flash generate the class definition. I can drag these tiles onto
the stage and they function as expected. However when it comes to
the more advanced tiles, if I set the class name to the class that
I have created (the one that extends "OptionTile") and leave the
base class as flash.display.MovieClip, nothing works when I drag
the movie clip onto the stage. If I then set the name of the base
class to the name of the class that I have created (the one that
extends "OptionTile") and let flash generate a class definition for
me, I get the same result when dragging the movie clip onto the
stage (i.e. nothing works).
I also see the following errors in the output window:
Level.as, Line 1 - 1152: A conflict exists with inherited
definition OptionTile.selection_mc in namespace public
OptionTile.as, Line 1 - 5000: The class 'OptionTile' must
subclass 'flash.display.MovieClip' since it is linked to a library
symbol of that type.
Level.as is one of my custom classes that extends
"OptionTile". "selection_mc" is a movie clip that is on my tiles,
this is just a white border that is set to visible when the mouse
is over the tile and invisible when the mouse has moved out (I have
used this to create the highlighting mentioned above). Both class
definitions are in the same folder as the fla file.
I am quite new to ActionScript and ive ran out of places to
look for answers! Ive tried searching for the errors on google, and
the only references I can find seem to point to missing import
statements in the classes. I have checked and double checked all my
import statements and I am importing everthing that is used in the