首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Adobe动画CC 360 Spin

Adobe动画CC 360 Spin
EN

Stack Overflow用户
提问于 2016-10-25 05:57:30
回答 3查看 3.9K关注 0票数 0

我试图在Adobe动画CC中创建一个简单的360自转。因此,用户需要拖动图像的左和右,以改变一个电影的框架。(我在32张照片中用360度的动画渲染了一辆汽车)

我有以下代码:

代码语言:javascript
复制
this.Silver.on("pressmove", function(evt){
evt.currentTarget.gotoAndStop(Math.round((evt.stageX/28.57142857)+1));// = (evt.stageX/2.777777778);

});

有没有一个简单的方法来创建一个简单的360?我已经搜索了谷歌的一些样本,但它们不在Adobe动画CC中。我也不是真正的程序员。只是想找个办法让我开始。

tnx!

EN

回答 3

Stack Overflow用户

发布于 2017-02-14 00:53:53

将项目拖到舞台上后,双击即可到达属性。你应该找到“轮换”。输入359 (而不是360,因为这将使车轮跳跃)。您还可以输入希望它旋转多少次。

希望这能有所帮助!

下午

票数 0
EN

Stack Overflow用户

发布于 2018-04-26 13:24:45

如果您打开Info面板(Window > Info),您会注意到,当您将鼠标光标移向左侧时,x值会减少,而当您将光标移向右侧时,x值会增加。

你可以在这里应用同样的概念。您将需要一个变量来跟踪您以前的x鼠标位置,并需要一个变量来跟踪您的新的x鼠标位置。

如果您的新鼠标位置大于旧的鼠标位置,您可以假设鼠标正在向右移动,您将向前移动一个框架。如果您的新鼠标位置小于旧的鼠标位置,您可以假设您的鼠标正在向左移动,您将向后移动一个框架。您还必须考虑在最后一帧上“向前”,在MovieClip的第一帧上“向后”。

这里有一种方法可以解决这个问题:

代码语言:javascript
复制
//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;
}
票数 0
EN

Stack Overflow用户

发布于 2018-11-11 17:49:11

动画CC 19.0提供了一个新的文档类型,允许您导出VR 360和VR全景内容的盒子。

有关更多细节,请参阅此处:https://helpx.adobe.com/animate/using/virtual-reality.html

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40232380

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档