AS3's :: name qualifier Operator equivalent in Haxe

How to convert the below AS3 line in haxe ?

this.currentBackgroundSkin.starling_internal::setParent(null);

I do that using @:access to be able to call private methods, like this :

@:access(starling.display.DisplayObject)
override public function dispose():Void 
{
	if (this.currentBackgroundSkin != null)
	{
		this.currentBackgroundSkin.__setParent(null);
	}
	//we don't dispose it if the group is the parent because it'll
	//already get disposed in super.dispose()
	if (this._backgroundSkin != null &&
		this._backgroundSkin.parent != this)
	{
		this._backgroundSkin.dispose();
	}
	if (this._backgroundDisabledSkin != null &&
		this._backgroundDisabledSkin.parent != this)
	{
		this._backgroundDisabledSkin.dispose();
	}
	this.layout = null;
	super.dispose();
}

1 Like