Skip to content

@:bind class that extends another @:bind class - wrong result #25

@CrazyFlasher

Description

@CrazyFlasher

I have a fla file with 2 assets linked to classes:
image

Box class:

@:bind class Box extends Sprite
{
    public var mc:MovieClip;

    public function new()
    {
        super();
    }
}

And Circle class:

@:bind class Circle extends Box
{
    public function new()
    {
        super();
    }
}

However when I instantiate Box and Circle - I see 2 boxes on the stage:

class Main extends Sprite
{
    public function new()
    {
        super();

        var box:Box = new Box();
        addChild(box);

        var circle:Circle = new Circle();
        circle.x = 200;
        addChild(circle);
    }
}

Result:
image

Is it a bug or known limitations that I should consider?

(Test project attached. Just run build.hxml)

inheritance_sample.zip

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions