作者:能豆子314 | 来源:互联网 | 2023-05-18 05:46
IamlearningActionScript3,andIhavethiscode:我正在学习ActionScript3,我有这个代码:}else{}else{
I am learning ActionScript 3, and I have this code:
我正在学习ActionScript 3,我有这个代码:
} else {
} else {
ourVod.x = stage.stageWidth / 2;
ourVod.y = stage.stageHeight / 2;
I am making an object (A) stay inside another object (B) that is not the stage. Object A follows the mouse until it is outside the Object B, and right now it comes back to the centre. I would like to to change the valour "stage.stageWidth / 2" for something like "the last x and y value the mouse was", so the object stays in the same point as it was when the mouse left Object B.
我正在制作一个物体(A)留在另一个不是舞台的物体(B)内。对象A跟随鼠标,直到它在对象B之外,现在它返回到中心。我想将“stage.stageWidth / 2”更改为“鼠标所在的最后x和y值”,因此该对象与鼠标离开对象B时保持相同的点。
Thanks a lot!!
非常感谢!!
1 个解决方案