diff --git a/haxe/ui/backend/ComponentBase.hx b/haxe/ui/backend/ComponentBase.hx index 22bd52c..6b544d4 100644 --- a/haxe/ui/backend/ComponentBase.hx +++ b/haxe/ui/backend/ComponentBase.hx @@ -25,11 +25,13 @@ class ComponentBase extends FlxSpriteGroup implements IComponentBase { var tf:TextDisplay; // text var input:TextInput; - var asComponent:Component = cast this; + var asComponent:Component; public function new() { super(); + asComponent = cast this; + scrollFactor.set(0, 0); // ui doesn't scroll by default surface = new FlxSprite();