Duplicate image with Haxe

自作多情 提交于 2019-12-04 16:37:36

The API is the very same, so I guess the problem is how you are trying to cast; try using:

var duplicationBitmap= new Bitmap(cast(loader.content, Bitmap).bitmapData);

What you mean the API doesn't allow it? By looking at these:

http://haxe.org/api/flash9/display/loader http://haxe.org/api/flash9/display/bitmap

It seems you should be able to port that code?

Are you getting any compiler error?

J

Theo.T

That's really weird, Bitmap is coming from the playerglobal.swc and shouldn't be related to any Haxe specific "API". Aren't you just attempting to access loader.content whilst the content is not yet loaded (i.e. the example above).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!