由网友(命里不缺狗 我要你何用!)分享简介:我的目标是使只使用一个方形图像全图。使用ActionScript 3的解决方案是简单地让从Loader新位图:My goal is to make a wide map using only one square image.Using actionscript 3 the solution is to simp...
我的目标是使只使用一个方形图像全图。 使用ActionScript 3的解决方案是简单地让从Loader新位图:
My goal is to make a wide map using only one square image. Using actionscript 3 the solution is to simply make new Bitmap from the Loader:
var loader:Loader = new Loader();
loader.load(new URLRequest("xyz.png"));
this.addChild(loader);
var duplicationBitmap:Bitmap = new Bitmap(Bitmap(loader.content).bitmapData);
不幸,HAXE API不允许这样做。我不能得到的位图数据从装载的内容...
Unluckily, Haxe API doesn't allow to do that. I can't get bitmapData from loader content…
任何人有一个线索?谢谢你。
Anyone has a clue? Thanks.
推荐答案
的API是非常相同的,所以我想这个问题是你如何试图投;尝试使用:
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);
相关推荐
最新文章