简体   繁体   English

Easeljs:鼠标事件停止工作

[英]Easeljs: mouse events stop working

I am implementing a touch animation with the EaselJs library. 我正在使用EaselJs库实现触摸动画。

When I read am image from a local folder all mouse events are working OK, like: onPress. 当我从本地文件夹中读取图像时,所有鼠标事件均正常运行,例如:onPress。

But when I choose an image source from a URL like: http://www.visionale.net/wp-content/uploads/cool-accessories-car.jpg 但是,当我从以下网址选择图像源时: http : //www.visionale.net/wp-content/uploads/cool-accessories-car.jpg

mouse events, like onPress, stop working. 鼠标事件(例如onPress)停止工作。

Try for example to dragAndDrop from library and change image link "img/x.jpg" to any link from internet. 例如,尝试从库中拖动和拖放,并将图像链接“ img / x.jpg”更改为来自互联网的任何链接。

That's the <canvas> crossdomain issue (security feature). 这就是<canvas>跨域问题(安全功能)。

There is a workaround: you can use a simple 'proxy script' on your server. 有一种解决方法:您可以在服务器上使用简单的“代理脚本”。 This one is pretty nice: http://benalman.com/projects/php-simple-proxy/ 这个非常不错: http//benalman.com/projects/php-simple-proxy/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM