为什么在动作脚本中嵌入 PNG 在添加到舞台时看起来会像素化?
这就是我所做的:
package
{
import flash.display.Bitmap;
import flash.display.Sprite;
public class Loading extends Sprite
{
[Embed(source="loading.png")]
private var MyLoading : Class;
private var spinner:Bitmap;
...
public function MoxieLoading(center:Point)
{
spinner = new MyLoading;
addChild(spinner);
...
当我的加载 png 最终出现时,它看起来像一个索引很差的 GIF,尤其是在边缘。为什么会发生这种情况?我在这里使用 Bitmap 类,也许有更好的东西?我可以控制质量吗?
Here is what I do:
package
{
import flash.display.Bitmap;
import flash.display.Sprite;
public class Loading extends Sprite
{
[Embed(source="loading.png")]
private var MyLoading : Class;
private var spinner:Bitmap;
...
public function MoxieLoading(center:Point)
{
spinner = new MyLoading;
addChild(spinner);
...
And when my loading png finally appears it looks like a poorly indexed GIF, especially on edges. Why is it happening? I'm using Bitmap class here, maybe there is something better? Can I control quality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是否存在任何缩放现象?尝试位图平滑:
Are there any scaling going on? Try Bitmap smoothing:
spinner
宽度、高度、比例、滤镜;x = 50
而不是x= 50.5
;但总的来说,这似乎是实际图片的问题,而不是闪光灯的问题。我从来没有遇到过嵌入 PNG 的任何问题,也许你保存它的程序以某种时髦的方式做到了?
spinner
width, height, scale, filters;x = 50
notx= 50.5
;But overall it seems like a problem with the actual picture, not flash. I never ever had any problems with embeded PNGs, maybe the program in which you saved it did it in some funky way?