开发者

Move movieclip position opposite of mouse coords on other movieclip

开发者 https://www.devze.com 2023-02-06 18:02 出处:网络
Okay I have a script in which I have added an image to the stage. It is absolute centered. I then have another with is on top but much bigger. I would like the big image to move opposite of my mouse p

Okay I have a script in which I have added an image to the stage. It is absolute centered. I then have another with is on top but much bigger. I would like the big image to move opposite of my mouse position on the smaller image.

ie: cursor is on bottom left corner the bottom left corner of the larger image is in the same spot开发者_开发问答. And the same thing for any other area.

I have tried many different ways but to no avail. I have done research but no one has been able to give me a solid answer.

Anyone know of a way to accomplish this. Keep in mind this it needs to work regardless of the image size.


Try using yourMovieclip.mouseX to get the position of the mouse relative to that movieclip

0

精彩评论

暂无评论...
验证码 换一张
取 消