鼠标跟随问题

来源:百度知道 编辑:UC知道 时间:2024/06/20 09:08:46
thisX = getProperty("/drg1", _x);
thisY = getProperty("/drg1", _y);
spX = getProperty("/spin1", _x);
spY = getProperty("/spin1", _y);
difX = thisX-spX;
difY = thisY-spY;
stepX = 1;
stepY = 1;
xStp = difX/25;
yStp = difY/25;
setProperty("/spin1", _x, Number(spX)+Number(xStp));
setProperty("/spin1", _y, Number(spY)+Number(yStp));

哪位大哥愿意帮忙翻译一下 。详细一点的讲解一下 。谢谢了 。。。
Flash的!

thisX = getProperty("/drg1", _x);
//把drg1的x坐标附给thisx
thisY = getProperty("/drg1", _y);
//把drg1的y坐标附给thisy
spX = getProperty("/spin1", _x);
//把spin11的x坐标附给spx
spY = getProperty("/spin1", _y);
//把drg1的y坐标附给thisy
difX = thisX-spX;
//把thisX-spX附给difx
difY = thisY-spY;
//把thisY-spY附给dify
stepX = 1;
stepY = 1;
xStp = difX/25;
yStp = difY/25;
setProperty("/spin1", _x, Number(spX)+Number(xStp));
//设置spin1的x坐标为spX+xStp
setProperty("/spin1", _y, Number(spY)+Number(yStp));
//设置spin1的x坐标为spX+xStp

不过这个写法现在早都不用了 这是flash5时候的写法

翻译?