0
我有一個剪輯中的圖形後續鼠標X在createjs
什麼,我試圖做的是: 當鼠標滑過我希望圖形移動父剪輯/遵循的方向我的目前爲止
exportRoot.game_anim.meterMC.addEventListener("mouseover",function (evt) {
var _this = evt.target.arrowYou
console.log(evt.target.arrowYou)
var mouseRight = 0;
var mouseLeft = 180;
var offset = {x: _this.x - evt.stageX, y: _this.y - evt.stageY};
evt.target.arrowYou.addEventListener("mousemove" , function(ev){
//)
var pt = exportRoot.game_anim.meterMC.globalToLocal(stage.mouseX, stage.mouseY)
if (pt.y > mouseLeft){
percent = 100;
} else if (pt.y < mouseRight){
percent = 0;
} else {
percent = Math.round(((pt.y - mouseRight)/(mouseLeft - mouseRight)*100));
_this.y = pt.y;
}
if (pt.y > mouseLeft){
}
setWheels(percent)
})
});