Async Image(Down)loader

Monkey Forums/User Modules/Async Image(Down)loader

k.o.g.(Posted 2016) [#1]
Hello All

Here is a version of my current Code, from my Async Image (Down)loader.

AsyncImageLib.js
http://kognetwork.ch/monkeyview/?file=monkeyview/imageasync/AsyncImageLib.js


AsyncImageLib.monkey
http://kognetwork.ch/monkeyview/?file=monkeyview/imageasync/AsyncImageLib.monkey


Usage:
local image:AsyncImage = AsyncImage.Load("http://localhost:80/image.jpg")
image.Draw(x, y, frame)
image.Draw(x, y, rotation, scaleX, scaleY, rotation, frame)
image.Loaded
image.Failed
image.FailedCode

AsyncImage.SaveDirectory 'Sets the Directory for saving the downloaded image
AsyncImage.BufferSize 'Sets the Size of downloading buffer


On HTML5:
- The Server, which holds the Image must allow CORS Requests!

More Informations following..