我试图在Adobe动画CC中创建一个简单的360自转。因此,用户需要拖动图像的左和右,以改变一个电影的框架。(我在32张照片中用360度的动画渲染了一辆汽车)
我有以下代码:
this.Silver.on("pressmove", function(evt){
evt.currentTarget.gotoAndStop(Math.round((evt.stageX/28.57142857)+1));// = (evt.stageX/2.777777778);
});有没有一个简单的方法来创建一个简单的360?我已经搜索了谷歌的一些样本,但它们不在Adobe动画CC中。我也不是真正的程序员。只是想找个办法让我开始。
tnx!
发布于 2017-02-14 00:53:53
将项目拖到舞台上后,双击即可到达属性。你应该找到“轮换”。输入359 (而不是360,因为这将使车轮跳跃)。您还可以输入希望它旋转多少次。
希望这能有所帮助!
下午
发布于 2018-04-26 13:24:45
如果您打开Info面板(Window > Info),您会注意到,当您将鼠标光标移向左侧时,x值会减少,而当您将光标移向右侧时,x值会增加。
你可以在这里应用同样的概念。您将需要一个变量来跟踪您以前的x鼠标位置,并需要一个变量来跟踪您的新的x鼠标位置。
如果您的新鼠标位置大于旧的鼠标位置,您可以假设鼠标正在向右移动,您将向前移动一个框架。如果您的新鼠标位置小于旧的鼠标位置,您可以假设您的鼠标正在向左移动,您将向后移动一个框架。您还必须考虑在最后一帧上“向前”,在MovieClip的第一帧上“向后”。
这里有一种方法可以解决这个问题:
//Create a reference to store the previous x mouse position
var old_mouseX = 0;
//Add an event listener
this.Silver.addEventListener("pressmove", mouseMovementHandler);
//Mouse movement handler
function mouseMovementHandler(event){
//Get a reference to the target
var currentTarget = event.currentTarget;
//Get a reference to the current x mouse position
var current_mouseX = stage.mouseX;
//Check for mouse movement to the left
if(current_mouseX < old_mouseX){
//Check if we're within the total frames of the MovieClip
if(currentTarget.currentFrame - 1 >= 0 ){
currentTarget.gotoAndStop(currentTarget.currentFrame - 1);
}
//If not, restart on the last frame of the MovieClip
else{
currentTarget.gotoAndStop(currentTarget.totalFrames - 1);
}
}
//Check for mouse movement to the right
else if(current_mouseX > old_mouseX){
//Check if we're within the total frames of the MovieClip
if(currentTarget.currentFrame + 1 <= currentTarget.totalFrames - 1){
currentTarget.gotoAndStop(currentTarget.currentFrame + 1);
}
//If not, restart at frame 0
else{
currentTarget.gotoAndStop(0);
}
}
//Update the old mouse position
old_mouseX = current_mouseX;
}发布于 2018-11-11 17:49:11
动画CC 19.0提供了一个新的文档类型,允许您导出VR 360和VR全景内容的盒子。
有关更多细节,请参阅此处:https://helpx.adobe.com/animate/using/virtual-reality.html
https://stackoverflow.com/questions/40232380
复制相似问题