[osflash] AS2 inheritance problem. flash bug ?

Dani Bacon danibacon at gmail.com
Wed Feb 14 13:49:19 EST 2007


hey Keith and yes, you are right, and actually i am importing
AbstractMarker, but didnt mention it. i only showed one import meaning to
explain that ReflectUtil is taken from as2lib.

since my post i actually got it back running. i did it by moving
AbstractMarker out of its package. compiling it using MMC [flash ide]. then
compiling it using MTASC [through FlashDevelop], this time it worked. and
then moving it back into the marker package and recompiling with MMC and
then MTASC and it worked.

so i believe it has to something to do with one or any combination of the
following : a compiler /  a bug /  flashdevelop /  packages /  imports.

anyone ? any ideas ?


On 14/02/07, Keith Salisbury <keithsalisbury at gmail.com> wrote:
>
> It may be a typo, but dont you need
>
> import org.as2lib.env.reflect.ReflectUtil;
> import marker.AbstractMarker;
>
> class marker.BoundedMarker extends AbstractMarker {
>
> ?
>
>
>
>
>
>
> On 2/14/07, Dani Bacon <danibacon at gmail.com> wrote:
>
> > hi,
> >
> > im trying to compile a flash8 project and the compiler seems to break an
> > inheritance connection between 2 classes.
> > movieclips are on stage and their library symbols are linked to the
> > Country class.
> > this worked but after making a few minor changes to AbstractMarker
> > [added a method] the compiler suddenly stopped recognizing the inheritance
> > connection between BoundedMarker and AbstractMarker.
> > code :
> >
> > class marker.AbstractMarker extends RadioButton implements Marker {
> >
> >     function AbstractMarker() {
> >     }
> >
> >     // methods
> >
> >     public function testMethodBaseClass() {}
> >
> > }
> >
> > import org.as2lib.env.reflect.ReflectUtil;
> >
> > class marker.BoundedMarker extends AbstractMarker {
> >
> >     function BoundedMarker() {
> >         super();
> >
> >         trace(ReflectUtil.getTypeNameForInstance(this.__proto__));                      // traces BoundedMarker [since
> > movieclips are based on Country]
> >
> >         trace(ReflectUtil.getTypeNameForInstance(this.__proto__.__proto__));
> > // traces Object [!! ignores AbstractMarker]
> >
> >         trace(this.test2);
> > // traces [type Function]
> >
> >         trace(this.testMethodBaseClass);
> > // traces undefined
> >
> >         // more code of course ...
> >
> >     }
> >
> >     public function test2() {}
> >
> > }
> >
> > class marker.Country extends BoundedMarker {
> >
> >     private function Country() {
> >     }
> >
> > }
> >
> > and
> >
> > trace(mc instanceof Country) is true
> > trace(mc instanceof BoundedMarker) is true
> >
> > but
> >
> > trace(mc instanceof AbstractMarker) is false
> >
> > im using FlashDevelop and MTASC but compiling via the flash8 env as
> > well.
> > anyone any ideas ? how do i even start finding the problem ? is this
> > some kind of flash bug ?
> >
> > regards
> > dani
> >
> > _______________________________________________
> > osflash mailing list
> > osflash at osflash.org
> > http://osflash.org/mailman/listinfo/osflash_osflash.org
> >
> >
>
>
> --
> keithsalisbury at gmail.com
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20070214/597eb7cd/attachment.htm


More information about the osflash mailing list