加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 woodey 于 2015-11-2 22:29 编辑
把titles1,parallaxes,battlebacks1文件夹里这些不需要透明度的图片转成jpg,然后其他的转PNG-8保留透明度
然后新建js插件或者在你自己的插件上添加如下代码
这样就能减少传输错误的概率了
ImageManager.loadBitmapJPG = function(folder, filename, hue, smooth) { if (filename) { var path = folder + encodeURIComponent(filename) + '.jpg'; var bitmap = this.loadNormalBitmap(path, hue || 0); bitmap.smooth = smooth; return bitmap; } else { return this.loadEmptyBitmap(); } }; ImageManager.loadBattleback1 = function(filename, hue) { return this.loadBitmapJPG('img/battlebacks1/', filename, hue, true); }; ImageManager.loadParallax = function(filename, hue) { return this.loadBitmapJPG('img/parallaxes/', filename, hue, true); }; ImageManager.loadTitle1 = function(filename, hue) { return this.loadBitmapJPG('img/titles1/', filename, hue, true); };
ImageManager.loadBitmapJPG = function(folder, filename, hue, smooth) {
if (filename) {
var path = folder + encodeURIComponent(filename) + '.jpg';
var bitmap = this.loadNormalBitmap(path, hue || 0);
bitmap.smooth = smooth;
return bitmap;
} else {
return this.loadEmptyBitmap();
}
};
ImageManager.loadBattleback1 = function(filename, hue) {
return this.loadBitmapJPG('img/battlebacks1/', filename, hue, true);
};
ImageManager.loadParallax = function(filename, hue) {
return this.loadBitmapJPG('img/parallaxes/', filename, hue, true);
};
ImageManager.loadTitle1 = function(filename, hue) {
return this.loadBitmapJPG('img/titles1/', filename, hue, true);
};
|