Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CrazyFlasher opened this issue Apr 18, 2023 · 0 comments
Open

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

CrazyFlasher opened this issue Apr 18, 2023 · 0 comments

Comments

@CrazyFlasher
Copy link

CrazyFlasher commented Apr 18, 2023

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

@CrazyFlasher CrazyFlasher changed the title @:bind class that extends aother @:bind class - wrong result @:bind class that extends another @:bind class - wrong result Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant