1
这里是我的代码:MouseX值更改时光标仍在
public function update()
{
//making the character follow the mouse
if(mouseX > (x + 25))
{ //if the mouse is to the right of mcMain
x += mainSpeed;//move mcMain to the right
}
else if (mouseX < (x - 25))
{//same thing with the left side
x -= mainSpeed;
}
else
{
trace(x + " and " + mouseX);
x = mouseX;//if it's close enough, then make it the same x value
}
}
对于一些未知的原因,mouseX这个对象的变化c值甚至当指针仍在(指物体闪烁)
这里的跟踪,当我离开光标还是:
84 and 80
80 and 84
84 and 80
80 and 84
84 and 80
80 and 84
84 and 80
mouseX没有被我改变了(而不能因为它的只读),没有这个对象,因为我任何其他代码我只是从这个开始项目。
谢谢。
完美!非常感谢你! – 2012-02-01 03:34:42