如何在Flash CS6 Spritesheet导出功能中设置注册点?

如何在Flash CS6 Spritesheet导出功能中设置注册点?,flash,position,export,sprite-sheet,flash-cs6,Flash,Position,Export,Sprite Sheet,Flash Cs6,我正在尝试调整导出的JSON文件精灵表,以便导入精灵,使其位置位于其注册点 在Flash中,我只需将偏移量添加到位置,即帧。偏移源,但这不起作用。。。这就是我现在导出它的方式: function frameExport(frame) { var s; if (hitFrame) s = "\n,{\n"; else s = "\n{\n"; s += AddKeyRect("frame", frame.frame); s+= ",\n"; var spriteSourceSiz

我正在尝试调整导出的JSON文件精灵表,以便导入精灵,使其位置位于其注册点

在Flash中,我只需将偏移量添加到位置,即
帧。偏移源
,但这不起作用。。。这就是我现在导出它的方式:

function frameExport(frame)
{

var s;
if (hitFrame)
    s = "\n,{\n";
else
    s = "\n{\n";
s += AddKeyRect("frame", frame.frame);
s+= ",\n";
var spriteSourceSize = new Object();
spriteSourceSize.x = frame.offsetInSource.x;
spriteSourceSize.y = frame.offsetInSource.y;
spriteSourceSize.w = frame.sourceSize.w;
spriteSourceSize.h = frame.sourceSize.h;
s += AddKeyRect("offset", spriteSourceSize);
s += "}";

hitFrame = true;

return s;
 }
如何以良好的方式导出此变量,使其相对位置也作为偏移变量导出? 还有其他的变量可以用吗? 我知道你可以使用这些变量:

frame.frame.x
frame.frame.y
frame.frame.w
frame.frame.h
frame.offsetInSource.x
frame.offsetInSource.y
frame.sourceSize.w
frame.sourceSize.h

提前感谢

我还尝试使用Sprite Sheet Exporter导出每个帧的相对位置。但我发现,在元数据中,“frame.offsetInSource.x”的值始终为零。我想这就是我想要的,也是你想要的

我试图编辑JSON.plugin.jsfl,取消对跟踪的注释。可悲的是,它仍然是零


到目前为止,我还不知道为什么。

是的,我也遇到了同样的问题,所以我略过了。