working ExternalInterface implementation