AS3随着鼠标移动而移动图像
这对某些人来说可能很容易,但我坚持这一点。我在舞台上的电影剪辑(mc_map)中有一张地图,还有一个小方块,它充当同一张地图的真正更大尺寸的遮罩。我想要做的是,当我在 mc_map 上移动鼠标时(例如:假设我的光标在纽约),小方形窗口将取消隐藏相同的区域,或者将移动更大的图像,以便相同的区域显示在方形掩码下。我还想向舞台添加另一个光标(或十字准线),该光标仅在正方形区域中存在,并复制鼠标在地图上的位置。对此的任何帮助将非常感谢。
This probably will be very easy for some, but I am stuck on this. I have a map in a movieclip(mc_map) on stage and a small square which acts as a mask to the really bigger size of the same map. What I am want to do is that when I move the mouse on the mc_map(eg: say my cursor is on New York), the small sqaure window will unhide the same area, or will move that bigger image such that the same area is shown under the square mask. I also want to add another cursor(or crosshair) to the stage which is live only in the area of the square and replicates the position of mouse on map. Any help on this will be great thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有很多关于这种“放大”效果的教程。看看这个是否有帮助: http://www.flashuser.net/flash-actionscript-as3/create-a-magnifying-glass-in-actionscript-3-0.html
There are a lot of tutorials on this type of "magnify" effect. See if this one helps: http://www.flashuser.net/flash-actionscript-as3/create-a-magnifying-glass-in-actionscript-3-0.html