Could not open haxeui.org - Avast error

Hi Ian,
When I try to open the haxeui.org , Avast antivirus give the following error:

One other question. I wasn’t using haxeui for a long time and I want to try it again, but main stopper for me was missing asynchronous loading of images for OpenFL ( via Assets.loadBitmapData(…) ) which is very important for HTML5 target and images with 3-5 MB in size .

Thank you.

Hey,

Ive submitted a report to avast to remove it from the blacklist - thanks for the heads up.

As for images, it should be fine - im pretty sure haxeui-openfl uses whatever openfl does, ill have to double check, but basically, you are talking about a 5mb asset (not http) that is in openfl, correct?

Cheers,
Ian

oh, i see… loadBitmapData is different to getBitmapData… So the way haxeui handles images is supposed to be async anyway - so maybe loadBitmapData is a better way to here in general - is there any difference between load / get (apart from the obvious fact one is sync and the other is async)

OK, so i think im going to change getBitmapData to loadBitmapData in the AssetsImpl, I think it makes more sense that way anyway, thanks for that…

One thing that has changed though (quite recently) is that you can set the image.resource to a BitmapData - previously it would only accept strings, now you could load your BitmapData anyway you wanted to (loadBitmapData, getBitmapData or even just create one in memory) and then set the image resource to that instance…

So something like this would be fine:

Assets.loadBitmapData("some huge image")
    .onProgress(function(current, max) {
        myHaxeUIProgressBar.pos = current;
    })
    .onComplete(function(bitmapData) {
        myHaxeUIImage.resource = bitmapData;
    });

Hopefully that helps?

Cheers,
Ian

Hi Ian,
Looks good. I will try it when start with HaxeUI again.

One more question. Before the images using from default haxeui theme ( scrollbars , buttons , etc ) was embedded in the source , if remember correctly, as Base64 . Is this still the case ?

I’m using haxeui - openfl version.

Hey,

So yeah, images/assets can also be embedded into the application as haxe.Resource’s - this is pretty important / useful as it means the themes can bring images with them and not have to rely on a frameworks build system to obtain assets. You find that problematic?

Cheers,
Ian

Let me know if it clears up or not.

Thanks again for the heads up :+1:

Ian

It works. I can open http://haxeui.org/ without problem.

It’s not something big , but why not use let’s encrypt to create certificate and auto renew on every three months using “certbot-auto renew”

About theme, I was talking about default theme of haxeui which load from the beginning.

Using HTML5 target this will take time (because theme is embeded ) and at example I prefer to load the screen with some minimum theme details and after that when the user is on main screen to load the other images, or to load in on demand.
It’s about to show something fast ( for HTML5)