[osflash] MovieClip subclasses without library MC
mrchrisallen at gmail.com
Thu Dec 21 09:59:38 EST 2006
This should work for you assuming that you do have a linkage
identifier specified for the MovieClip in the library. You would
either need SWFMill or use the Flash IDE to get that in there. Now,
I'm not sure if FlashDevelop can use SWFMill to accomplish this type
of thing, if it does you need to have it inject the assets into a SWF
and then match that linkage id in the class that you write: Replacing
symbolName with whatever you called your instance name.
private static var symbolLinked = Object.registerClass(symbolName, MyButton);
You also can use AS2Ant with SWFMill to accomplish this part.
With this said, I've found that it's usually better to use composition
instead of inheritance with MovieClips in AS2. I particularly don't
like the syntax that is required to instantiate the instances, and as
you have discovered, you need to rely on another tool to get the
linkage IDs into the SWF and then need to rely on extra rather obscure
code in each of your extended classes.
On 12/21/06, Eric Kersten <ekersten at gmail.com> wrote:
> I've been trying to work exclusively with FlashDevelop to create a
> simple project but I can't seem to get to work the example at
> It simply creates nothing.
> Was it written for another tool or is there something extra i need to
> setup for it to work?
> Thanks in advanced.
> Eric Kersten [ekersten at gmail.com]
> Web Site & Application Developer
> Macromedia Certified Flash MX 2004 Developer
> osflash mailing list
> osflash at osflash.org
More information about the osflash